#!/user/bin/python3
# @Author:  LSY
# @Date:    2020/9/14

from typing import List
from app.database import convert
from sqlalchemy import and_

from app.models.po.hanfan.hanfan_new_predict_po import HanfanNewPredictPO
from app.services.dal.literalquery import literalquery

from app.models.po.hanfan.hanfan_model_input_po import HanFanModelInputPO
from app.models.po.hanfan.hanfan_predict_po import HanFanPredictPO
import datetime
from app.exts import ironman_redis
from app.schemas.hanfan import HanFanSchema
from app.models.po.gaolu import gaolu_model
from sqlalchemy import func, DECIMAL, FLOAT, INT
import logging
from app.utils.constant import HanFanStatus
from app.utils.sys_utils import get_time_round_and_adjust

hanfan_schema = HanFanSchema()
hanfan_schemas = HanFanSchema(many=True)


def get_hanfan_result_one(query_time) -> HanFanPredictPO:
    start = query_time - datetime.timedelta(hours=1)
    end = query_time + datetime.timedelta(hours=1)
    ret = convert.query(HanFanPredictPO, HanFanPredictPO.GMT_CREATE.between(start, end)).first()
    return ret

def get_new_hanfan_result_one(query_time) -> HanfanNewPredictPO:
    ret = convert.query(HanfanNewPredictPO, HanfanNewPredictPO.DATE_TIME == query_time).first()
    return ret

def get_new_hanfan_results(start:datetime,end:datetime) -> HanfanNewPredictPO:
    ret = convert.query(HanfanNewPredictPO,
                        HanfanNewPredictPO.DATE_TIME >= start,
                        HanfanNewPredictPO.DATE_TIME <= end).all()
    return ret


def hanfan_history_between(start, end, left='close', right='close', order_by=None) -> List[HanFanPredictPO]:
    """
    :param start:
    :param end:
    :param left:
    :param right:
    :param order_by:
    :return:
    """
    if end is None or start is None:
        return None
    ret = hanfan_history_between_query(start, end, left, right, order_by=order_by).all()
    return ret


def get_latest_input_cache():
    input_po = HanFanModelInputPO()
    query_time = datetime.datetime.now()
    input_po.GMT_CREATE = query_time
    update_time_dict = ironman_redis.hget_all_str_decode('update')
    value_dict = ironman_redis.hget_all_str_decode('hanfan')
    for v in input_po.__dir__():
        if v.startswith('CG'):
            if v in update_time_dict:
                time = datetime.datetime.strptime(update_time_dict[v], "%Y-%m-%d %H:%M:%S")
                input_po.FDate = time.strftime("%Y-%m-%d")
                input_po.FHour = time.hour
            input_po.__setattr__(v, float(value_dict[v]) if v in value_dict else None)
    return input_po


def get_input_cache_by_datetime(query_time, cache_key):
    """
    :return:
    """
    input_po = HanFanModelInputPO()
    input_po.GMT_CREATE = query_time
    value_dict = ironman_redis.hget_all_str_decode(cache_key)
    for v in input_po.__dir__():
        if v.startswith('CG'):
            input_po.__setattr__(v, float(value_dict[v]) if v in value_dict else None)
    input_po.FDate = query_time.strftime("%Y-%m-%d")
    input_po.FHour = query_time.hour
    return input_po


def predict_result_insert(hanfan_predict_po: HanFanPredictPO):
    convert.add_one(hanfan_predict_po)


def add_backtracking_data_list(entities: List[HanFanPredictPO]):
    convert.add_all(entities)


def hanfan_history_between_query(start, end, left='close', right='close', order_by=None) \
        -> List[HanFanPredictPO]:
    if left == "close" and right == "close":
        ret = convert.query(HanFanPredictPO, HanFanPredictPO.GMT_CREATE.between(start, end), order_by=order_by)
    elif left == "open" and right == "open":
        ret = convert.query(HanFanPredictPO,
                            and_(HanFanPredictPO.GMT_CREATE > start, HanFanPredictPO.GMT_CREATE < end),
                            order_by=order_by)
    elif left == "open" and right == "close":
        ret = convert.query(HanFanPredictPO,
                            and_(HanFanPredictPO.GMT_CREATE > start, HanFanPredictPO.GMT_CREATE <= end),
                            order_by=order_by)
    elif left == "close" and right == "open":
        ret = convert.query(HanFanPredictPO,
                            and_(HanFanPredictPO.GMT_CREATE >= start, HanFanPredictPO.GMT_CREATE < end),
                            order_by=order_by)
    return ret


def hanfan_history_between_json(start, end, left='close', right='close', order_by=None):
    ret = hanfan_history_between(start, end, left, right, order_by=order_by)
    if len(ret) <= 0: return None
    result = hanfan_schemas.dumps(ret)
    return result


def delete_from_to_predict(start_time, end_time):
    return convert.delete_from(HanFanPredictPO,
                               and_(HanFanPredictPO.GMT_CREATE >= start_time, HanFanPredictPO.GMT_CREATE <= end_time))


def cal_hanfan_predict_column(hanFanModelInputPO: HanFanModelInputPO):
    """
    根据实时的原燃料参数和延时1天8小时的含钒成分字段计算入模所需的字段
    :return:
    """
    if hanFanModelInputPO.FDate is None:
        hanFanModelInputPO.DateTime = None
    elif isinstance(hanFanModelInputPO.FDate, str):
        date = datetime.datetime.strptime(hanFanModelInputPO.FDate, "%Y-%m-%d")
        hanFanModelInputPO.DateTime = date + datetime.timedelta(hours=hanFanModelInputPO.FHour)
    else:
        date = hanFanModelInputPO.FDate
        hanFanModelInputPO.DateTime = date + datetime.timedelta(hours=hanFanModelInputPO.FHour)
    # get datetime before 1 day and 8 hours ago
    query_time = get_time_round_and_adjust(hanFanModelInputPO.DateTime, step=-32, round_level='hour')
    hanFanPredict_data = get_hanfan_result_one(query_time)

    # 预处理含钒原燃料字段数据, 如果为空，设置默认值
    if hanFanPredict_data is not None:
        hanFanPredict_data = __set_default_value_if_null(hanFanPredict_data)
    else:
        logging.info("[HanfanPredictColumn] result is None")

    zb_shao_1_ji_fan = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    zb_shao_2_ji_fan = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    zb_shao_3_ji_fan = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    zb_shao_56_ji_fan = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    zb_shao_1_ji_pu = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    zb_shao_2_ji_pu = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    zb_shao_3_ji_pu = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE

    if hanFanModelInputPO is not None:
        zb_shao_1_ji_fan = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBshao1jifan
        zb_shao_2_ji_fan = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBshao2jifan
        zb_shao_3_ji_fan = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBshao3jifan
        zb_shao_56_ji_fan = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBshao56jifan
        zb_shao_1_ji_pu = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBshao1jipu
        zb_shao_2_ji_pu = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBshao2jipu
        zb_shao_3_ji_pu = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBshao3jipu

    # CG_LT_GL_GL04_Yuanranliao_Shao_TFe
    y_shao_TFe = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        y_shao_TFe = (zb_shao_1_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jifan_TFe) + \
                     (zb_shao_2_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jifan_TFe) + \
                     (zb_shao_3_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jifan_TFe) + \
                     (zb_shao_56_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao56jifan_TFe) + \
                     (zb_shao_1_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jipu_TFe) + \
                     (zb_shao_2_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jipu_TFe) + \
                     (zb_shao_3_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jipu_TFe)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_TFe = y_shao_TFe

    # CG_LT_GL_GL04_Yuanranliao_Shao_FeO
    y_shao_FeO = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        y_shao_FeO = (zb_shao_1_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jifan_FeO) + \
                     (zb_shao_2_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jifan_FeO) + \
                     (zb_shao_3_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jifan_FeO) + \
                     (zb_shao_56_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao56jifan_FeO) + \
                     (zb_shao_1_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jipu_FeO) + \
                     (zb_shao_2_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jipu_FeO) + \
                     (zb_shao_3_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jipu_FeO)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_FeO = y_shao_FeO

    # CG_LT_GL_GL04_Yuanranliao_Shao_CaO
    y_shao_CaO = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        y_shao_CaO = (zb_shao_1_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jifan_CaO) + \
                     (zb_shao_2_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jifan_CaO) + \
                     (zb_shao_3_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jifan_CaO) + \
                     (zb_shao_56_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao56jifan_CaO) + \
                     (zb_shao_1_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jipu_CaO) + \
                     (zb_shao_2_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jipu_CaO) + \
                     (zb_shao_3_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jipu_CaO)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_CaO = y_shao_CaO

    # CG_LT_GL_GL04_Yuanranliao_Shao_SiO2
    y_shao_SiO2 = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        y_shao_SiO2 = (zb_shao_1_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jifan_SiO2) + \
                      (zb_shao_2_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jifan_SiO2) + \
                      (zb_shao_3_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jifan_SiO2) + \
                      (zb_shao_56_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao56jifan_SiO2) + \
                      (zb_shao_1_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jipu_SiO2) + \
                      (zb_shao_2_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jipu_SiO2) + \
                      (zb_shao_3_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jipu_SiO2)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_SiO2 = y_shao_SiO2

    # CG_LT_GL_GL04_Yuanranliao_Shao_P
    y_shao_P = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        y_shao_P = (zb_shao_1_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jifan_P) + \
                   (zb_shao_2_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jifan_P) + \
                   (zb_shao_3_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jifan_P) + \
                   (zb_shao_56_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao56jifan_P) + \
                   (zb_shao_1_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jipu_P) + \
                   (zb_shao_2_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jipu_P) + \
                   (zb_shao_3_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jipu_P)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_P = y_shao_P

    # CG_LT_GL_GL04_Yuanranliao_Shao_MgO
    y_shao_MgO = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        y_shao_MgO = (zb_shao_1_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jifan_MgO) + \
                     (zb_shao_2_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jifan_MgO) + \
                     (zb_shao_3_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jifan_MgO) + \
                     (zb_shao_56_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao56jifan_MgO) + \
                     (zb_shao_1_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jipu_MgO) + \
                     (zb_shao_2_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jipu_MgO) + \
                     (zb_shao_3_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jipu_MgO)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_MgO = y_shao_MgO

    # CG_LT_GL_GL04_Yuanranliao_Shao_Al2O3
    y_shao_Al2O3 = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        y_shao_Al2O3 = (zb_shao_1_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jifan_Al2O3) + \
                       (zb_shao_2_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jifan_Al2O3) + \
                       (zb_shao_3_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jifan_Al2O3) + \
                       (zb_shao_56_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao56jifan_Al2O3) + \
                       (zb_shao_1_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jipu_Al2O3) + \
                       (zb_shao_2_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jipu_Al2O3) + \
                       (zb_shao_3_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jipu_Al2O3)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_Al2O3 = y_shao_Al2O3

    # CG_LT_GL_GL04_Yuanranliao_Shao_TiO2
    y_shao_TiO2 = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        y_shao_TiO2 = (zb_shao_1_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jifan_TiO2) + \
                      (zb_shao_2_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jifan_TiO2) + \
                      (zb_shao_3_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jifan_TiO2) + \
                      (zb_shao_56_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao56jifan_TiO2) + \
                      (zb_shao_1_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jipu_TiO2) + \
                      (zb_shao_2_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jipu_TiO2) + \
                      (zb_shao_3_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jipu_TiO2)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_TiO2 = y_shao_TiO2

    # CG_LT_GL_GL04_Yuanranliao_Shao_V2O5
    y_shao_V2O5 = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        y_shao_V2O5 = (zb_shao_1_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jifan_V2O5) + \
                      (zb_shao_2_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jifan_V2O5) + \
                      (zb_shao_3_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jifan_V2O5) + \
                      (zb_shao_56_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao56jifan_V2O5) + \
                      (zb_shao_1_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jipu_V2O5) + \
                      (zb_shao_2_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jipu_V2O5) + \
                      (zb_shao_3_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jipu_V2O5)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_V2O5 = y_shao_V2O5

    # CG_LT_GL_GL04_Yuanranliao_Shao_R
    y_shao_R = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None and hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao_SiO2 > 0:
        y_shao_R = hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao_CaO / hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao_SiO2
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_R = y_shao_R

    # CG_LT_GL_GL04_Yuanranliao_Shao_RZhongzhi
    r_zhong_zhi = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        r_zhong_zhi = (zb_shao_1_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jifan_RZhongzhi) + \
                      (zb_shao_2_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jifan_RZhongzhi) + \
                      (zb_shao_3_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jifan_RZhongzhi) + \
                      (zb_shao_56_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao56jifan_RZhongzhi) + \
                      (zb_shao_1_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jipu_RZhongzhi) + \
                      (zb_shao_2_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jipu_RZhongzhi) + \
                      (zb_shao_3_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jipu_RZhongzhi)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_RZhongzhi = r_zhong_zhi

    # CG_LT_GL_GL04_Yuanranliao_Shao_PinweiZhongzhi
    ping_wei_zhong_zhi = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        ping_wei_zhong_zhi = (
                                     zb_shao_1_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jifan_PinweiZhongzhi) + \
                             (
                                     zb_shao_2_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jifan_PinweiZhongzhi) + \
                             (
                                     zb_shao_3_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jifan_PinweiZhongzhi) + \
                             (
                                     zb_shao_56_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao56jifan_PinweiZhongzhi) + \
                             (zb_shao_1_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jipu_PinweiZhongzhi) + \
                             (zb_shao_2_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jipu_PinweiZhongzhi) + \
                             (zb_shao_3_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jipu_PinweiZhongzhi)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_PinweiZhongzhi = ping_wei_zhong_zhi

    # CG_LT_GL_GL04_Yuanranliao_Shao_ZSshaifen
    zs_shai_fen = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        zs_shai_fen = (zb_shao_1_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jifan_ZSshaifen) + \
                      (zb_shao_2_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jifan_ZSshaifen) + \
                      (zb_shao_3_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jifan_ZSshaifen) + \
                      (zb_shao_56_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao56jifan_ZSshaifen) + \
                      (zb_shao_1_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jipu_ZSshaifen) + \
                      (zb_shao_2_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jipu_ZSshaifen) + \
                      (zb_shao_3_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jipu_ZSshaifen)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_ZSshaifen = zs_shai_fen

    # CG_LT_GL_GL04_Yuanranliao_Shao_Less10mm
    less_10_mm = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        less_10_mm = (zb_shao_1_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jifan_Less10mm) + \
                     (zb_shao_2_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jifan_Less10mm) + \
                     (zb_shao_3_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jifan_Less10mm) + \
                     (zb_shao_56_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao56jifan_Less10mm) + \
                     (zb_shao_1_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jipu_Less10mm) + \
                     (zb_shao_2_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jipu_Less10mm) + \
                     (zb_shao_3_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jipu_Less10mm)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_Less10mm = less_10_mm

    # CG_LT_GL_GL04_Yuanranliao_Shao_ZSzhuangu
    zs_zhuan_gu = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        zs_zhuan_gu = (zb_shao_1_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jifan_ZSzhuangu) + \
                      (zb_shao_2_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jifan_ZSzhuangu) + \
                      (zb_shao_3_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jifan_ZSzhuangu) + \
                      (zb_shao_56_ji_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao56jifan_ZSzhuangu) + \
                      (zb_shao_1_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao1jipu_ZSzhuangu) + \
                      (zb_shao_2_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao2jipu_ZSzhuangu) + \
                      (zb_shao_3_ji_pu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Shao3jipu_ZSzhuangu)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_ZSzhuangu = zs_zhuan_gu

    zb_qiu_xin_tong_mei = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    zb_qiu_chuang_yuan_mei = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    zb_qiu_shuang_fu_fan = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    zb_qiu_shuang_fu_mei = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    zb_qiu_shuang_fu_mei_k1 = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    zb_qiu_ao_zhou_hanfan = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    zb_qiu_eluosi = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        zb_qiu_xin_tong_mei = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuXintongMei
        zb_qiu_chuang_yuan_mei = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuChuangyuanMei
        zb_qiu_shuang_fu_fan = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuShuangfuFan
        zb_qiu_shuang_fu_mei = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuShuangfuMei
        zb_qiu_shuang_fu_mei_k1 = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuShuangfuMeik1
        zb_qiu_ao_zhou_hanfan = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan
        zb_qiu_eluosi = hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_ZBqiuEluosi

    # CG_LT_GL_GL04_Yuanranliao_Qiu_TFe
    qiu_TFe = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        qiu_TFe = (zb_qiu_xin_tong_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_TFe) + \
                  (zb_qiu_shuang_fu_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_TFe) + \
                  (zb_qiu_shuang_fu_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_TFe) + \
                  (zb_qiu_shuang_fu_mei_k1 * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_TFe) + \
                  (zb_qiu_ao_zhou_hanfan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_TFe) + \
                  (zb_qiu_eluosi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuEluosi_TFe)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_TFe = qiu_TFe

    # CG_LT_GL_GL04_Yuanranliao_Qiu_FeO
    qiu_FeO = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        qiu_FeO = (zb_qiu_xin_tong_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_FeO) + \
                  (zb_qiu_shuang_fu_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_FeO) + \
                  (zb_qiu_shuang_fu_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_FeO) + \
                  (zb_qiu_shuang_fu_mei_k1 * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_FeO) + \
                  (zb_qiu_ao_zhou_hanfan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_FeO) + \
                  (zb_qiu_eluosi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuEluosi_FeO)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_FeO = qiu_FeO

    # CG_LT_GL_GL04_Yuanranliao_Qiu_CaO
    qiu_CaO = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        qiu_CaO = (zb_qiu_xin_tong_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_CaO) + \
                  (zb_qiu_shuang_fu_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_CaO) + \
                  (zb_qiu_shuang_fu_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_CaO) + \
                  (zb_qiu_shuang_fu_mei_k1 * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_CaO) + \
                  (zb_qiu_ao_zhou_hanfan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_CaO) + \
                  (zb_qiu_eluosi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuEluosi_CaO)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_CaO = qiu_CaO

    # CG_LT_GL_GL04_Yuanranliao_Qiu_SiO2
    qiu_SiO2 = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        qiu_SiO2 = (zb_qiu_xin_tong_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_SiO2) + \
                   (zb_qiu_shuang_fu_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_SiO2) + \
                   (zb_qiu_shuang_fu_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_SiO2) + \
                   (zb_qiu_shuang_fu_mei_k1 * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_SiO2) + \
                   (zb_qiu_ao_zhou_hanfan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_SiO2) + \
                   (zb_qiu_eluosi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuEluosi_SiO2)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_SiO2 = qiu_SiO2

    # CG_LT_GL_GL04_Yuanranliao_Qiu_MgO
    qiu_MgO = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        qiu_MgO = (zb_qiu_xin_tong_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_MgO) + \
                  (zb_qiu_shuang_fu_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_MgO) + \
                  (zb_qiu_shuang_fu_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_MgO) + \
                  (zb_qiu_shuang_fu_mei_k1 * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_MgO) + \
                  (zb_qiu_ao_zhou_hanfan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_MgO) + \
                  (zb_qiu_eluosi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuEluosi_MgO)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_MgO = qiu_MgO

    # get datetime before 4 days ago
    query_time = get_time_round_and_adjust(hanFanModelInputPO.DateTime, step=-(4 * 24), round_level='hour')
    # get 4 days ago hanfan predict data
    hanFanPredict_data = get_hanfan_result_one(query_time)

    # 预处理含钒原燃料字段数据, 如果为空，设置默认值
    if hanFanPredict_data is not None:
        hanFanPredict_data = __set_default_value_if_null(hanFanPredict_data)

    zb_qiu_xin_tong_mei = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    zb_qiu_chuang_yuan_mei = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    zb_qiu_shuang_fu_fan = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    zb_qiu_shuang_fu_mei = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    zb_qiu_shuang_fu_mei_k1 = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    zb_qiu_ao_zhou_hanfan = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    zb_qiu_eluosi = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanModelInputPO is not None:
        zb_qiu_xin_tong_mei = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuXintongMei
        zb_qiu_chuang_yuan_mei = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuChuangyuanMei
        zb_qiu_shuang_fu_fan = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuShuangfuFan
        zb_qiu_shuang_fu_mei = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuShuangfuMei
        zb_qiu_shuang_fu_mei_k1 = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuShuangfuMeik1
        zb_qiu_ao_zhou_hanfan = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan
        zb_qiu_eluosi = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuEluosi

    # CG_LT_GL_GL04_Yuanranliao_Qiu_Al2O3
    qiu_Al2O3 = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        qiu_Al2O3 = (zb_qiu_xin_tong_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_Al2O3) + \
                    (zb_qiu_chuang_yuan_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_Al2O3) + \
                    (zb_qiu_shuang_fu_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_Al2O3) + \
                    (zb_qiu_shuang_fu_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_Al2O3) + \
                    (zb_qiu_shuang_fu_mei_k1 * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_Al2O3) + \
                    (zb_qiu_ao_zhou_hanfan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_Al2O3) + \
                    (zb_qiu_eluosi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuEluosi_Al2O3)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_Al2O3 = qiu_Al2O3

    # CG_LT_GL_GL04_Yuanranliao_Qiu_TiO2
    qiu_TiO2 = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        qiu_TiO2 = (zb_qiu_xin_tong_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_TiO2) + \
                   (zb_qiu_chuang_yuan_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_TiO2) + \
                   (zb_qiu_shuang_fu_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_TiO2) + \
                   (zb_qiu_shuang_fu_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_TiO2) + \
                   (zb_qiu_shuang_fu_mei_k1 * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_TiO2) + \
                   (zb_qiu_ao_zhou_hanfan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_TiO2) + \
                   (zb_qiu_eluosi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuEluosi_TiO2)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_TiO2 = qiu_TiO2

    # CG_LT_GL_GL04_Yuanranliao_Qiu_V2O5
    qiu_V2O5 = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        qiu_V2O5 = (zb_qiu_xin_tong_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_V2O5) + \
                   (zb_qiu_chuang_yuan_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_V2O5) + \
                   (zb_qiu_shuang_fu_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_V2O5) + \
                   (zb_qiu_shuang_fu_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_V2O5) + \
                   (zb_qiu_shuang_fu_mei_k1 * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_V2O5) + \
                   (zb_qiu_ao_zhou_hanfan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_V2O5) + \
                   (zb_qiu_eluosi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuEluosi_V2O5)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_V2O5 = qiu_V2O5

    # CG_LT_GL_GL04_Yuanranliao_Qiu_P
    qiu_P = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        qiu_P = (zb_qiu_xin_tong_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_P) + \
                (zb_qiu_chuang_yuan_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_P) + \
                (zb_qiu_shuang_fu_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_P) + \
                (zb_qiu_shuang_fu_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_P) + \
                (zb_qiu_shuang_fu_mei_k1 * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_P) + \
                (zb_qiu_ao_zhou_hanfan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_P) + \
                (zb_qiu_eluosi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuEluosi_P)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_P = qiu_P

    # CG_LT_GL_GL04_Yuanranliao_Qiu_S
    qiu_S = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        qiu_S = (zb_qiu_xin_tong_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_S) + \
                (zb_qiu_chuang_yuan_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_S) + \
                (zb_qiu_shuang_fu_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_S) + \
                (zb_qiu_shuang_fu_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_S) + \
                (zb_qiu_shuang_fu_mei_k1 * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_S) + \
                (zb_qiu_ao_zhou_hanfan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_S) + \
                (zb_qiu_eluosi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuEluosi_S)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_S = qiu_S

    # CG_LT_GL_GL04_Yuanranliao_Qiu_H2O
    qiu_H2O = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        qiu_H2O = (zb_qiu_xin_tong_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_H2O) + \
                  (zb_qiu_chuang_yuan_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_H2O) + \
                  (zb_qiu_shuang_fu_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_H2O) + \
                  (zb_qiu_shuang_fu_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_H2O) + \
                  (zb_qiu_shuang_fu_mei_k1 * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_H2O) + \
                  (zb_qiu_ao_zhou_hanfan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_H2O) + \
                  (zb_qiu_eluosi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuEluosi_H2O)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_H2O = qiu_H2O

    # CG_LT_GL_GL04_Yuanranliao_Qiu_QDkangya
    qiu_QDkangya = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        qiu_QDkangya = (zb_qiu_xin_tong_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_QDkangya) + \
                       (zb_qiu_chuang_yuan_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_QDkangya) + \
                       (
                               zb_qiu_shuang_fu_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_QDkangya) + \
                       (zb_qiu_shuang_fu_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_QDkangya) + \
                       (
                               zb_qiu_shuang_fu_mei_k1 * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_QDkangya) + \
                       (
                               zb_qiu_ao_zhou_hanfan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_QDkangya) + \
                       (zb_qiu_eluosi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuEluosi_QDkangya)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_QDkangya = qiu_QDkangya

    # CG_LT_GL_GL04_Yuanranliao_Qiu_ZSshaifen
    qiu_zs_shaifen = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        qiu_zs_shaifen = (zb_qiu_xin_tong_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_ZSshaifen) + \
                         (
                                 zb_qiu_chuang_yuan_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_ZSshaifen) + \
                         (
                                 zb_qiu_shuang_fu_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_ZSshaifen) + \
                         (
                                 zb_qiu_shuang_fu_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_ZSshaifen) + \
                         (
                                 zb_qiu_shuang_fu_mei_k1 * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_ZSshaifen) + \
                         (
                                 zb_qiu_ao_zhou_hanfan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_ZSshaifen) + \
                         (zb_qiu_eluosi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuEluosi_ZSshaifen)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_ZSshaifen = qiu_zs_shaifen

    # CG_LT_GL_GL04_Yuanranliao_Qiu_ZSzhuangu
    qiu_zs_zhuangu = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        qiu_zs_zhuangu = (zb_qiu_xin_tong_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_ZSzhuangu) + \
                         (
                                 zb_qiu_chuang_yuan_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_ZSzhuangu) + \
                         (
                                 zb_qiu_shuang_fu_fan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_ZSzhuangu) + \
                         (
                                 zb_qiu_shuang_fu_mei * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_ZSzhuangu) + \
                         (
                                 zb_qiu_shuang_fu_mei_k1 * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_ZSzhuangu) + \
                         (
                                 zb_qiu_ao_zhou_hanfan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_ZSzhuangu) + \
                         (zb_qiu_eluosi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_QiuEluosi_ZSzhuangu)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_ZSzhuangu = qiu_zs_zhuangu

    zb_kuai_weiruineila = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBkuaiWeiruineila
    zb_kuai_aokuai = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBkuaiAokuai
    zb_kuai_aokuai_pb = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBkuaiAokuaiPB
    zb_kuai_niuman = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBkuaiNiuman

    # CG_LT_GL_GL04_Yuanranliao_Kuai_TFe
    kuai_TFe = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        kuai_TFe = (zb_kuai_weiruineila * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_TFe) + \
                   (zb_kuai_aokuai * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_TFe) + \
                   (zb_kuai_aokuai_pb * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_TFe) + \
                   (zb_kuai_niuman * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_TFe)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Kuai_TFe = kuai_TFe

    # TODO CG_LT_GL_GL04_Yuanranliao_Kuai_FeO设置默认值，该字段暂时没有检测点
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Kuai_FeO = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE

    # CG_LT_GL_GL04_Yuanranliao_Kuai_CaO
    kuai_CaO = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        kuai_CaO = (zb_kuai_weiruineila * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_CaO) + \
                   (zb_kuai_aokuai * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_CaO) + \
                   (zb_kuai_aokuai_pb * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_CaO) + \
                   (zb_kuai_niuman * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_CaO)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Kuai_CaO = kuai_CaO

    # TODO CG_LT_GL_GL04_Yuanranliao_Kuai_MgO设置默认值，该字段暂时没有检测点
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Kuai_MgO = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE

    # CG_LT_GL_GL04_Yuanranliao_Kuai_SiO2
    kuai_SiO2 = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        kuai_SiO2 = (zb_kuai_weiruineila * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_SiO2) + \
                    (zb_kuai_aokuai * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_SiO2) + \
                    (zb_kuai_aokuai_pb * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_SiO2) + \
                    (zb_kuai_niuman * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_SiO2)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Kuai_SiO2 = kuai_SiO2

    # TODO CG_LT_GL_GL04_Yuanranliao_Kuai_V2O5 设置默认值，该字段暂时没有检测点
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Kuai_V2O5 = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE

    # CG_LT_GL_GL04_Yuanranliao_Kuai_Al2O3
    kuai_Al2O3 = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        kuai_Al2O3 = (zb_kuai_weiruineila * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_Al2O3) + \
                     (zb_kuai_aokuai * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_Al2O3) + \
                     (zb_kuai_aokuai_pb * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_Al2O3) + \
                     (zb_kuai_niuman * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_Al2O3)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Kuai_Al2O3 = kuai_Al2O3

    # CG_LT_GL_GL04_Yuanranliao_Kuai_TiO2
    kuai_TiO2 = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        kuai_TiO2 = (zb_kuai_weiruineila * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_TiO2) + \
                    (zb_kuai_aokuai * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_TiO2) + \
                    (zb_kuai_aokuai_pb * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_TiO2) + \
                    (zb_kuai_niuman * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_TiO2)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Kuai_TiO2 = kuai_TiO2

    # CG_LT_GL_GL04_Yuanranliao_Kuai_P
    kuai_P = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        kuai_P = (zb_kuai_weiruineila * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_P) + \
                 (zb_kuai_aokuai * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_P) + \
                 (zb_kuai_aokuai_pb * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_P) + \
                 (zb_kuai_niuman * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_P)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Kuai_P = kuai_P

    # CG_LT_GL_GL04_Yuanranliao_Kuai_S
    kuai_S = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        kuai_S = (zb_kuai_weiruineila * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_S) + \
                 (zb_kuai_aokuai * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_S) + \
                 (zb_kuai_aokuai_pb * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_S) + \
                 (zb_kuai_niuman * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_S)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Kuai_S = kuai_S

    # CG_LT_GL_GL04_Yuanranliao_Kuai_H2O
    kuai_H2O = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        kuai_H2O = (zb_kuai_weiruineila * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_H2O) + \
                   (zb_kuai_aokuai * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_H2O) + \
                   (zb_kuai_aokuai_pb * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_H2O) + \
                   (zb_kuai_niuman * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_H2O)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Kuai_H2O = kuai_H2O

    zb_coke_wenfeng = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcokeWenfeng
    zb_coke_1_ji_ganxi = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcoke1jiganxi
    zb_coke_zhongluan_2_qi_gan = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcokeZhongluan2qiGan
    zb_coke_zhongluan_2_qi_shi = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcokeZhongluan2qiShi
    zb_coke_2_ji_ganxi = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcoke2jiganxi
    zb_coke_2_ji_jiao = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcoke2jijiao
    zb_coke_2_ji_jiao_defeng = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcoke2jijiaoDefeng
    zb_coke_1_ji_datuhe = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcoke1jiDatuhe
    zb_coke_defeng = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcokeDefeng
    zb_coke_putong_1_ji_dong = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcokePutong1jiDong
    zb_coke_gengyang_gaoliu = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcokeGengyanggaoliu

    # CG_LT_GL_GL04_Yuanranliao_Coke_Ad
    coke_Ad = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        coke_Ad = (zb_coke_wenfeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_Ad) + \
                  (zb_coke_1_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_Ad) + \
                  (zb_coke_zhongluan_2_qi_gan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_Ad) + \
                  (zb_coke_zhongluan_2_qi_shi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_Ad) + \
                  (zb_coke_2_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_Ad) + \
                  (zb_coke_2_ji_jiao * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_Ad) + \
                  (zb_coke_2_ji_jiao_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_Ad) + \
                  (zb_coke_1_ji_datuhe * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_Ad) + \
                  (zb_coke_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeDefeng_Ad) + \
                  (zb_coke_putong_1_ji_dong * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_Ad) + \
                  (zb_coke_gengyang_gaoliu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_Ad)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Coke_Ad = coke_Ad

    # CG_LT_GL_GL04_Yuanranliao_Coke_FCad
    coke_FCad = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        coke_FCad = (zb_coke_wenfeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_FCad) + \
                    (zb_coke_1_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_FCad) + \
                    (
                            zb_coke_zhongluan_2_qi_gan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_FCad) + \
                    (
                            zb_coke_zhongluan_2_qi_shi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_FCad) + \
                    (zb_coke_2_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_FCad) + \
                    (zb_coke_2_ji_jiao * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_FCad) + \
                    (zb_coke_2_ji_jiao_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_FCad) + \
                    (zb_coke_1_ji_datuhe * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_FCad) + \
                    (zb_coke_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeDefeng_FCad) + \
                    (zb_coke_putong_1_ji_dong * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_FCad) + \
                    (zb_coke_gengyang_gaoliu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_FCad)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Coke_FCad = coke_FCad

    # CG_LT_GL_GL04_Yuanranliao_Coke_VDaf
    coke_VDaf = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        coke_VDaf = (zb_coke_wenfeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_VDaf) + \
                    (zb_coke_1_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_VDaf) + \
                    (
                            zb_coke_zhongluan_2_qi_gan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_VDaf) + \
                    (
                            zb_coke_zhongluan_2_qi_shi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_VDaf) + \
                    (zb_coke_2_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_VDaf) + \
                    (zb_coke_2_ji_jiao * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_VDaf) + \
                    (zb_coke_2_ji_jiao_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_VDaf) + \
                    (zb_coke_1_ji_datuhe * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_VDaf) + \
                    (zb_coke_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeDefeng_VDaf) + \
                    (zb_coke_putong_1_ji_dong * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_VDaf) + \
                    (zb_coke_gengyang_gaoliu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_VDaf)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Coke_VDaf = coke_VDaf

    # CG_LT_GL_GL04_Yuanranliao_Coke_Std
    coke_Std = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        coke_Std = (zb_coke_wenfeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_Std) + \
                   (zb_coke_1_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_Std) + \
                   (zb_coke_zhongluan_2_qi_gan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_Std) + \
                   (zb_coke_zhongluan_2_qi_shi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_Std) + \
                   (zb_coke_2_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_Std) + \
                   (zb_coke_2_ji_jiao * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_Std) + \
                   (zb_coke_2_ji_jiao_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_Std) + \
                   (zb_coke_1_ji_datuhe * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_Std) + \
                   (zb_coke_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeDefeng_Std) + \
                   (zb_coke_putong_1_ji_dong * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_Std) + \
                   (zb_coke_gengyang_gaoliu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_Std)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Coke_Std = coke_Std

    # CG_LT_GL_GL04_Yuanranliao_Coke_CRI
    coke_CRI = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        coke_CRI = (zb_coke_wenfeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_CRI) + \
                   (zb_coke_1_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_CRI) + \
                   (zb_coke_zhongluan_2_qi_gan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_CRI) + \
                   (zb_coke_zhongluan_2_qi_shi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_CRI) + \
                   (zb_coke_2_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_CRI) + \
                   (zb_coke_2_ji_jiao * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_CRI) + \
                   (zb_coke_2_ji_jiao_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_CRI) + \
                   (zb_coke_1_ji_datuhe * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_CRI) + \
                   (zb_coke_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeDefeng_CRI) + \
                   (zb_coke_putong_1_ji_dong * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_CRI) + \
                   (zb_coke_gengyang_gaoliu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_CRI)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Coke_CRI = coke_CRI

    # CG_LT_GL_GL04_Yuanranliao_Coke_CSR
    coke_CSR = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        coke_CSR = (zb_coke_wenfeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_CSR) + \
                   (zb_coke_1_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_CSR) + \
                   (zb_coke_zhongluan_2_qi_gan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_CSR) + \
                   (zb_coke_zhongluan_2_qi_shi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_CSR) + \
                   (zb_coke_2_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_CSR) + \
                   (zb_coke_2_ji_jiao * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_CSR) + \
                   (zb_coke_2_ji_jiao_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_CSR) + \
                   (zb_coke_1_ji_datuhe * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_CSR) + \
                   (zb_coke_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeDefeng_CSR) + \
                   (zb_coke_putong_1_ji_dong * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_CSR) + \
                   (zb_coke_gengyang_gaoliu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_CSR)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Coke_CSR = coke_CSR

    # CG_LT_GL_GL04_Yuanranliao_Coke_H2O
    coke_H2O = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        coke_H2O = (zb_coke_wenfeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_H2O) + \
                   (zb_coke_1_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_H2O) + \
                   (zb_coke_zhongluan_2_qi_gan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_H2O) + \
                   (zb_coke_zhongluan_2_qi_shi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_H2O) + \
                   (zb_coke_2_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_H2O) + \
                   (zb_coke_2_ji_jiao * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_H2O) + \
                   (zb_coke_2_ji_jiao_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_H2O) + \
                   (zb_coke_1_ji_datuhe * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_H2O) + \
                   (zb_coke_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeDefeng_H2O) + \
                   (zb_coke_putong_1_ji_dong * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_H2O) + \
                   (zb_coke_gengyang_gaoliu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_H2O)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Coke_H2O = coke_H2O

    # CG_LT_GL_GL04_Yuanranliao_Coke_M10
    coke_M10 = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        coke_M10 = (zb_coke_wenfeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_M10) + \
                   (zb_coke_1_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_M10) + \
                   (zb_coke_zhongluan_2_qi_gan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_M10) + \
                   (zb_coke_zhongluan_2_qi_shi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_M10) + \
                   (zb_coke_2_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_M10) + \
                   (zb_coke_2_ji_jiao * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_M10) + \
                   (zb_coke_2_ji_jiao_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_M10) + \
                   (zb_coke_1_ji_datuhe * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_M10) + \
                   (zb_coke_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeDefeng_M10) + \
                   (zb_coke_putong_1_ji_dong * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_M10) + \
                   (zb_coke_gengyang_gaoliu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_M10)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Coke_M10 = coke_M10

    # CG_LT_GL_GL04_Yuanranliao_Coke_M40
    coke_M40 = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        coke_M40 = (zb_coke_wenfeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_M40) + \
                   (zb_coke_1_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_M40) + \
                   (zb_coke_zhongluan_2_qi_gan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_M40) + \
                   (zb_coke_zhongluan_2_qi_shi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_M40) + \
                   (zb_coke_2_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_M40) + \
                   (zb_coke_2_ji_jiao * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_M40) + \
                   (zb_coke_2_ji_jiao_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_M40) + \
                   (zb_coke_1_ji_datuhe * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_M40) + \
                   (zb_coke_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeDefeng_M40) + \
                   (zb_coke_putong_1_ji_dong * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_M40) + \
                   (zb_coke_gengyang_gaoliu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_M40)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Coke_M40 = coke_M40

    # CG_LT_GL_GL04_Yuanranliao_Coke_Less25mm
    coke_Less25mm = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        coke_Less25mm = (zb_coke_wenfeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_Less25mm) + \
                        (zb_coke_1_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_Less25mm) + \
                        (
                                zb_coke_zhongluan_2_qi_gan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_Less25mm) + \
                        (
                                zb_coke_zhongluan_2_qi_shi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_Less25mm) + \
                        (zb_coke_2_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_Less25mm) + \
                        (zb_coke_2_ji_jiao * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_Less25mm) + \
                        (
                                zb_coke_2_ji_jiao_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_Less25mm) + \
                        (zb_coke_1_ji_datuhe * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_Less25mm) + \
                        (zb_coke_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeDefeng_Less25mm) + \
                        (
                                zb_coke_putong_1_ji_dong * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_Less25mm) + \
                        (
                                zb_coke_gengyang_gaoliu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_Less25mm)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Coke_Less25mm = coke_Less25mm

    # CG_LT_GL_GL04_Yuanranliao_Coke_Greater40mm
    coke_Greater40mm = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        coke_Greater40mm = (zb_coke_wenfeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_Greater40mm) + \
                           (
                                   zb_coke_1_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_Greater40mm) + \
                           (
                                   zb_coke_zhongluan_2_qi_gan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_Greater40mm) + \
                           (
                                   zb_coke_zhongluan_2_qi_shi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_Greater40mm) + \
                           (
                                   zb_coke_2_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_Greater40mm) + \
                           (zb_coke_2_ji_jiao * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_Greater40mm) + \
                           (
                                   zb_coke_2_ji_jiao_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_Greater40mm) + \
                           (
                                   zb_coke_1_ji_datuhe * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_Greater40mm) + \
                           (zb_coke_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeDefeng_Greater40mm) + \
                           (
                                   zb_coke_putong_1_ji_dong * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_Greater40mm) + \
                           (
                                   zb_coke_gengyang_gaoliu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_Greater40mm)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Coke_Greater40mm = coke_Greater40mm

    # CG_LT_GL_GL04_Yuanranliao_Coke_Greater60mm
    coke_Greater60mm = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        coke_Greater60mm = (zb_coke_wenfeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_Greater60mm) + \
                           (
                                   zb_coke_1_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_Greater60mm) + \
                           (
                                   zb_coke_zhongluan_2_qi_gan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_Greater60mm) + \
                           (
                                   zb_coke_zhongluan_2_qi_shi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_Greater60mm) + \
                           (
                                   zb_coke_2_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_Greater60mm) + \
                           (zb_coke_2_ji_jiao * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_Greater60mm) + \
                           (
                                   zb_coke_2_ji_jiao_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_Greater60mm) + \
                           (
                                   zb_coke_1_ji_datuhe * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_Greater60mm) + \
                           (zb_coke_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeDefeng_Greater60mm) + \
                           (
                                   zb_coke_putong_1_ji_dong * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_Greater60mm) + \
                           (
                                   zb_coke_gengyang_gaoliu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_Greater60mm)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Coke_Greater60mm = coke_Greater60mm

    # CG_LT_GL_GL04_Yuanranliao_Coke_Greater80mm
    coke_Greater80mm = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanPredict_data is not None:
        coke_Greater80mm = (zb_coke_wenfeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_Greater80mm) + \
                           (
                                   zb_coke_1_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_Greater80mm) + \
                           (
                                   zb_coke_zhongluan_2_qi_gan * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_Greater80mm) + \
                           (
                                   zb_coke_zhongluan_2_qi_shi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_Greater80mm) + \
                           (
                                   zb_coke_2_ji_ganxi * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_Greater80mm) + \
                           (zb_coke_2_ji_jiao * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_Greater80mm) + \
                           (
                                   zb_coke_2_ji_jiao_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_Greater80mm) + \
                           (
                                   zb_coke_1_ji_datuhe * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_Greater80mm) + \
                           (zb_coke_defeng * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeDefeng_Greater80mm) + \
                           (
                                   zb_coke_putong_1_ji_dong * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_Greater80mm) + \
                           (
                                   zb_coke_gengyang_gaoliu * hanFanPredict_data.CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_Greater80mm)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Coke_Greater80mm = coke_Greater80mm

    zb_shao = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBshao
    zb_qiu = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiu
    zb_kuai = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBkuai

    # CG_LT_GL_GL04_Yuanranliao_Ore_TFe
    y_ore_TFe = (zb_shao * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_TFe) + \
                (zb_qiu * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_TFe) + \
                (zb_kuai * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Kuai_TFe)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Ore_TFe = y_ore_TFe

    # CG_LT_GL_GL04_Yuanranliao_Ore_FeO
    y_ore_FeO = (zb_shao * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_FeO) + \
                (zb_qiu * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_FeO) + \
                (zb_kuai * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Kuai_FeO)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Ore_FeO = y_ore_FeO

    # CG_LT_GL_GL04_Yuanranliao_Ore_CaO
    y_ore_CaO = (zb_shao * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_CaO) + \
                (zb_qiu * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_CaO) + \
                (zb_kuai * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Kuai_CaO)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Ore_CaO = y_ore_CaO

    # CG_LT_GL_GL04_Yuanranliao_Ore_SiO2
    y_ore_SiO2 = (zb_shao * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_SiO2) + \
                 (zb_qiu * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_SiO2) + \
                 (zb_kuai * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Kuai_SiO2)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Ore_SiO2 = y_ore_SiO2

    # CG_LT_GL_GL04_Yuanranliao_Ore_MgO
    y_ore_MgO = (zb_shao * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_MgO) + \
                (zb_qiu * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_MgO) + \
                (zb_kuai * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Kuai_MgO)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Ore_MgO = y_ore_MgO

    # CG_LT_GL_GL04_Yuanranliao_Ore_Al2O3
    y_ore_Al2O3 = (zb_shao * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_Al2O3) + \
                  (zb_qiu * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_Al2O3) + \
                  (zb_kuai * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Kuai_Al2O3)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Ore_Al2O3 = y_ore_Al2O3

    # CG_LT_GL_GL04_Yuanranliao_Ore_TiO2
    y_ore_TiO2 = (zb_shao * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_TiO2) + \
                 (zb_qiu * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_TiO2) + \
                 (zb_kuai * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Kuai_TiO2)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Ore_TiO2 = y_ore_TiO2

    # CG_LT_GL_GL04_Yuanranliao_Ore_V2O5
    y_ore_V2O5 = (zb_shao * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_V2O5) + \
                 (zb_qiu * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_V2O5) + \
                 (zb_kuai * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Kuai_V2O5)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Ore_V2O5 = y_ore_V2O5

    # CG_LT_GL_GL04_Yuanranliao_Ore_P
    y_ore_P = (zb_shao * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_P) + \
              (zb_qiu * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_P) + \
              (zb_kuai * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Kuai_P)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Ore_P = y_ore_P

    # CG_LT_GL_GL04_Yuanranliao_Ore_S
    # y_ore_S = (zb_shao * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_S) + \
    #           (zb_qiu * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_S) + \
    #           (zb_kuai * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Kuai_S)

    y_ore_S = (zb_qiu * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_S) + \
              (zb_kuai * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Kuai_S)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Ore_S = y_ore_S

    # CG_LT_GL_GL04_Yuanranliao_Ore_H2O
    # y_ore_H2O = (zb_shao * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao_H2O) + \
    #           (zb_qiu * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_H2O) + \
    #           (zb_kuai * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Kuai_H2O)

    y_ore_H2O = (zb_qiu * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Qiu_H2O) + \
                (zb_kuai * hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Kuai_H2O)
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Ore_H2O = y_ore_H2O

    # CG_LT_GL_GL04_Yuanranliao_Ore_R
    y_ore_R = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Ore_SiO2 > 0:
        y_ore_R = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Ore_CaO / hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Ore_SiO2
    hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Ore_R = y_ore_R

    return hanFanModelInputPO


def dump_hanfan_data(start: datetime, end: datetime, cache_key=HanFanStatus.HANFAN_DEFAULT_CACHE_KEY):
    # start_of_day = datetime.datetime(start.year, start.month, start.day) - datetime.timedelta(days=1)
    # hour = start.hour
    try:
        mapping = {}

        # logging.info("CG_LT_GL_GL04_Tie_Cu")
        Tie_Cu_list = __calculate_TieShui_or_LuZha(start, 0, jcxmbm="01104")
        if Tie_Cu_list is not None and len(Tie_Cu_list) > 0:
            _set_mapping(mapping, "CG_LT_GL_GL04_Tie_Cu", float(Tie_Cu_list[0].YuanRanLiao))
            for i in range(1, len(Tie_Cu_list)):
                _set_mapping(mapping, "CG_LT_GL_GL04_Tie_Cu" + str(i), float(Tie_Cu_list[i].YuanRanLiao))

        # CG_LT_GL_GL04_Zha_TFe
        Zha_TFe_list = __calculate_LuZha_Yuanranliao_by_wlbm_and_jcxmbm(start, 0, jcxmbm="01001", wlbm='ZJ003')
        if Zha_TFe_list is not None and len(Zha_TFe_list) > 0:
            mapping['CG_LT_GL_GL04_Zha_TFe'] = float(Zha_TFe_list[0].YuanRanLiao)
            for i in range(1, len(Zha_TFe_list)):
                yuanranliao_name = "CG_LT_GL_GL04_Zha_TFe" + str(i)
                mapping[yuanranliao_name] = float(Zha_TFe_list[i].YuanRanLiao)

        # CG_LT_GL_GL04_Zha_CaO
        Zha_CaO_list = __calculate_LuZha_Yuanranliao_by_wlbm_and_jcxmbm(start, 0, jcxmbm="01010", wlbm='ZJ003')
        if Zha_CaO_list is not None and len(Zha_CaO_list) > 0:
            mapping['CG_LT_GL_GL04_Zha_CaO'] = float(Zha_CaO_list[0].YuanRanLiao)
            for i in range(1, len(Zha_CaO_list)):
                yuanranliao_name = "CG_LT_GL_GL04_Zha_CaO" + str(i)
                mapping[yuanranliao_name] = float(Zha_TFe_list[i].YuanRanLiao)

        # CG_LT_GL_GL04_Zha_SiO2
        Zha_SiO2_list = __calculate_LuZha_Yuanranliao_by_wlbm_and_jcxmbm(start, 0, jcxmbm="01011", wlbm='ZJ003')
        if Zha_SiO2_list is not None and len(Zha_SiO2_list) > 0:
            mapping['CG_LT_GL_GL04_Zha_SiO2'] = float(Zha_SiO2_list[0].YuanRanLiao)
            for i in range(1, len(Zha_SiO2_list)):
                yuanranliao_name = "CG_LT_GL_GL04_Zha_SiO2" + str(i)
                mapping[yuanranliao_name] = float(Zha_SiO2_list[i].YuanRanLiao)

        # CG_LT_GL_GL04_Zha_MgO
        Zha_MgO_list = __calculate_LuZha_Yuanranliao_by_wlbm_and_jcxmbm(start, 0, jcxmbm="01013", wlbm='ZJ003')
        if Zha_MgO_list is not None and len(Zha_MgO_list) > 0:
            mapping['CG_LT_GL_GL04_Zha_MgO'] = float(Zha_MgO_list[0].YuanRanLiao)
            for i in range(1, len(Zha_MgO_list)):
                yuanranliao_name = "CG_LT_GL_GL04_Zha_MgO" + str(i)
                mapping[yuanranliao_name] = float(Zha_MgO_list[i].YuanRanLiao)

        # CG_LT_GL_GL04_Zha_Al2O3
        Zha_Al2O3_list = __calculate_LuZha_Yuanranliao_by_wlbm_and_jcxmbm(start, 0, jcxmbm="01052", wlbm='ZJ003')
        if Zha_Al2O3_list is not None and len(Zha_Al2O3_list) > 0:
            mapping['CG_LT_GL_GL04_Zha_Al2O3'] = float(Zha_Al2O3_list[0].YuanRanLiao)
            for i in range(1, len(Zha_Al2O3_list)):
                yuanranliao_name = "CG_LT_GL_GL04_Zha_Al2O3" + str(i)
                mapping[yuanranliao_name] = float(Zha_Al2O3_list[i].YuanRanLiao)

        # CG_LT_GL_GL04_Zha_S
        Zha_S_list = __calculate_LuZha_Yuanranliao_by_wlbm_and_jcxmbm(start, 0, jcxmbm="01003", wlbm='ZJ003')
        if Zha_S_list is not None and len(Zha_S_list) > 0:
            mapping['CG_LT_GL_GL04_Zha_S'] = float(Zha_S_list[0].YuanRanLiao)
            for i in range(1, len(Zha_S_list)):
                yuanranliao_name = "CG_LT_GL_GL04_Zha_S" + str(i)
                mapping[yuanranliao_name] = float(Zha_S_list[i].YuanRanLiao)

        # CG_LT_GL_GL04_Zha_TiO2
        Zha_TiO2_list = __calculate_LuZha_Yuanranliao_by_wlbm_and_jcxmbm(start, 0, jcxmbm="01002", wlbm='ZJ003')
        if Zha_TiO2_list is not None and len(Zha_TiO2_list) > 0:
            mapping['CG_LT_GL_GL04_Zha_TiO2'] = float(Zha_TiO2_list[0].YuanRanLiao)
            for i in range(1, len(Zha_TiO2_list)):
                yuanranliao_name = "CG_LT_GL_GL04_Zha_TiO2" + str(i)
                mapping[yuanranliao_name] = float(Zha_TiO2_list[i].YuanRanLiao)

        # CG_LT_GL_GL04_Zha_V2O5
        Zha_V2O5_list = __calculate_LuZha_Yuanranliao_by_wlbm_and_jcxmbm(start, 0, jcxmbm="01005", wlbm='ZJ003')
        if Zha_V2O5_list is not None and len(Zha_V2O5_list) > 0:
            mapping['CG_LT_GL_GL04_Zha_V2O5'] = float(Zha_V2O5_list[0].YuanRanLiao)
            for i in range(1, len(Zha_V2O5_list)):
                yuanranliao_name = "CG_LT_GL_GL04_Zha_V2O5" + str(i)
                mapping[yuanranliao_name] = float(Zha_V2O5_list[i].YuanRanLiao)

        # CG_LT_GL_GL04_Si_Ti
        t1_sub_query = convert.query(gaolu_model.ZlJyh, jcxmbm='01058', zfbz='0') \
            .join(gaolu_model.ZlJyt, gaolu_model.ZlJyh.jytid == gaolu_model.ZlJyt.jytid) \
            .filter(gaolu_model.ZlJyt.wlbm == '60110101', func.substring(gaolu_model.ZlJyt.ph, 3, 1) == '4') \
            .group_by(func.substring(gaolu_model.ZlJyt.ph, 1, 7)) \
            .with_entities(func.avg(func.cast(gaolu_model.ZlJyh.jyjg, DECIMAL(10, 5))).label('si_ti'),
                           func.max(func.substring(gaolu_model.ZlJyt.ph, 4, 4)).label('FNumber')) \
            .subquery()

        now_before_48_hour = start - datetime.timedelta(hours=48)
        zl2 = convert.query(gaolu_model.GaoLuChuTie, finsid=8) \
            .join(t1_sub_query, gaolu_model.GaoLuChuTie.fnumber == t1_sub_query.c.FNumber) \
            .filter(gaolu_model.GaoLuChuTie.fdatetime.between(now_before_48_hour, start)) \
            .order_by(gaolu_model.GaoLuChuTie.fdatetime.desc()) \
            .limit(1) \
            .with_entities(t1_sub_query.c.si_ti).first()
        if zl2 is not None:
            # logging.info("----> value for V is", float(zl2.si_ti))
            # ironman_redis.hset("hanfan", "CG_LT_GL_GL04_Si_Ti", float(zl2.si_ti))
            mapping['CG_LT_GL_GL04_Si_Ti'] = float(zl2.si_ti)

        # CG_LT_GL_GL04_FCokeRate、CG_LT_GL_GL04_FBatchHour、CG_LT_GL_GL04_FBatchAcc、
        # CG_LT_GL_GL04_FCokeBatchHour、CG_LT_GL_GL04_FCokeBatchAcc和CG_LT_GL_GL04_FCoalR (前8小时)
        start_before_8_hour = start - datetime.timedelta(hours=8)
        day = datetime.datetime(start_before_8_hour.year, start_before_8_hour.month, start_before_8_hour.day)
        hour = start_before_8_hour.hour
        shangliaoqk_1 = convert.query(gaolu_model.ShangLiaoQk, fdate=day,
                                      fhour=hour, finsid=8).first()
        if shangliaoqk_1 is not None:
            mapping['CG_LT_GL_GL04_FBatchHour'] = float(shangliaoqk_1.fbatchhour)
            mapping['CG_LT_GL_GL04_FCokeRate'] = float(shangliaoqk_1.fcokerate)
            mapping['CG_LT_GL_GL04_FBatchAcc'] = float(shangliaoqk_1.fbatchacc)
            mapping['CG_LT_GL_GL04_FCokeBatchHour'] = float(shangliaoqk_1.fcokebatchhour)
            mapping['CG_LT_GL_GL04_FCokeBatchAcc'] = float(shangliaoqk_1.fcokebatchacc)
            mapping['CG_LT_GL_GL04_FCoalR'] = float(shangliaoqk_1.fcoalr)
            # CG_LT_GL_GL04_Yuanranliao_ZCoal 与 CG_LT_GL_GL04_FCoalR一样
            mapping['CG_LT_GL_GL04_Yuanranliao_ZCoal'] = float(shangliaoqk_1.fcoalr)

            # logging.info("CG_LT_GL_GL04_Tie_C")
            Tie_C_list = __calculate_TieShui_or_LuZha(start, 0, jcxmbm="01007")
            if Tie_C_list is not None and len(Tie_C_list) > 0:
                mapping['CG_LT_GL_GL04_Tie_C'] = float(Tie_C_list[0].YuanRanLiao)
                for i in range(1, len(Tie_C_list)):
                    yuanranliao_name = "CG_LT_GL_GL04_Tie_C" + str(i)
                    mapping[yuanranliao_name] = float(Tie_C_list[i].YuanRanLiao)

            # logging.info("CG_LT_GL_GL04_Tie_Cr")
            Tie_Cr_list = __calculate_TieShui_or_LuZha(start, 0, jcxmbm="01050")
            if Tie_Cr_list is not None and len(Tie_Cr_list) > 0:
                mapping['CG_LT_GL_GL04_Tie_Cr'] = float(Tie_Cr_list[0].YuanRanLiao)
                for i in range(1, len(Tie_Cr_list)):
                    yuanranliao_name = "CG_LT_GL_GL04_Tie_Cr" + str(i)
                    mapping[yuanranliao_name] = float(Tie_Cr_list[i].YuanRanLiao)

            # CG_LT_GL_GL04_Tie_Mn
            Tie_Mn_list = __calculate_TieShui_or_LuZha(start, 0, jcxmbm="01008")
            if Tie_Mn_list is not None and len(Tie_Mn_list) > 0:
                mapping['CG_LT_GL_GL04_Tie_Mn'] = float(Tie_Mn_list[0].YuanRanLiao)
                for i in range(1, len(Tie_Mn_list)):
                    yuanranliao_name = "CG_LT_GL_GL04_Tie_Mn" + str(i)
                    mapping[yuanranliao_name] = float(Tie_Mn_list[i].YuanRanLiao)

            # CG_LT_GL_GL04_Tie_Mo
            Tie_Mn_list = __calculate_TieShui_or_LuZha(start, 0, jcxmbm="01105")
            if Tie_Mn_list is not None and len(Tie_Mn_list) > 0:
                mapping['CG_LT_GL_GL04_Tie_Mo'] = float(Tie_Mn_list[0].YuanRanLiao)
                for i in range(1, len(Tie_Mn_list)):
                    yuanranliao_name = "CG_LT_GL_GL04_Tie_Mo" + str(i)
                    mapping[yuanranliao_name] = float(Tie_Mn_list[i].YuanRanLiao)

            # CG_LT_GL_GL04_Tie_Ni
            Tie_Ni_list = __calculate_TieShui_or_LuZha(start, 0, jcxmbm="01103")
            if Tie_Ni_list is not None and len(Tie_Ni_list) > 0:
                mapping['CG_LT_GL_GL04_Tie_Ni'] = float(Tie_Ni_list[0].YuanRanLiao)
                for i in range(1, len(Tie_Ni_list)):
                    yuanranliao_name = "CG_LT_GL_GL04_Tie_Ni" + str(i)
                    mapping[yuanranliao_name] = float(Tie_Ni_list[i].YuanRanLiao)

            # CG_LT_GL_GL04_Tie_P
            Tie_P_list = __calculate_TieShui_or_LuZha(start, 0, jcxmbm="01004")
            if Tie_P_list is not None and len(Tie_P_list) > 0:
                mapping['CG_LT_GL_GL04_Tie_P'] = float(Tie_P_list[0].YuanRanLiao)
                for i in range(1, len(Tie_P_list)):
                    yuanranliao_name = "CG_LT_GL_GL04_Tie_P" + str(i)
                    mapping[yuanranliao_name] = float(Tie_P_list[i].YuanRanLiao)

            # CG_LT_GL_GL04_Tie_S
            Tie_S_list = __calculate_TieShui_or_LuZha(start, 0, jcxmbm="01003")
            if Tie_S_list is not None and len(Tie_S_list) > 0:
                mapping['CG_LT_GL_GL04_Tie_S'] = float(Tie_S_list[0].YuanRanLiao)
                for i in range(1, len(Tie_S_list)):
                    yuanranliao_name = "CG_LT_GL_GL04_Tie_S" + str(i)
                    mapping[yuanranliao_name] = float(Tie_S_list[i].YuanRanLiao)

            # CG_LT_GL_GL04_Tie_Si
            Tie_S_list = __calculate_TieShui_or_LuZha(start, 0, jcxmbm="01009")
            if Tie_S_list is not None and len(Tie_S_list) > 0:
                mapping['CG_LT_GL_GL04_Tie_S'] = float(Tie_S_list[0].YuanRanLiao)
                for i in range(1, len(Tie_S_list)):
                    yuanranliao_name = "CG_LT_GL_GL04_Tie_S" + str(i)
                    mapping[yuanranliao_name] = float(Tie_S_list[i].YuanRanLiao)

            # CG_LT_GL_GL04_Tie_Si_Ti
            Tie_Si_Ti_list = __calculate_TieShui_or_LuZha(start, 0, jcxmbm="01058")
            if Tie_Si_Ti_list is not None and len(Tie_Si_Ti_list) > 0:
                mapping['CG_LT_GL_GL04_Tie_Si_Ti'] = float(Tie_Si_Ti_list[0].YuanRanLiao)
                for i in range(1, len(Tie_Si_Ti_list)):
                    yuanranliao_name = "CG_LT_GL_GL04_Tie_Si_Ti" + str(i)
                    mapping[yuanranliao_name] = float(Tie_Si_Ti_list[i].YuanRanLiao)

            # CG_LT_GL_GL04_Tie_V
            Tie_V_list = __calculate_TieShui_or_LuZha(start, 0, jcxmbm="01048")
            if Tie_V_list is not None and len(Tie_V_list) > 0:
                ironman_redis.hset("hanfan", "CG_LT_GL_GL04_Tie_V", float(Tie_V_list[0].YuanRanLiao))
                mapping['CG_LT_GL_GL04_Tie_V'] = float(Tie_V_list[0].YuanRanLiao)
                for i in range(1, len(Tie_V_list)):
                    yuanranliao_name = "CG_LT_GL_GL04_Tie_V" + str(i)
                    mapping[yuanranliao_name] = float(Tie_V_list[i].YuanRanLiao)
                    ironman_redis.hset("hanfan", yuanranliao_name, float(Tie_V_list[i].YuanRanLiao))
            else:
                mapping['CG_LT_GL_GL04_Tie_V'] = ironman_redis.hget("hanfan", "CG_LT_GL_GL04_Tie_V")
                for i in range(1, 5):
                    cache = ironman_redis.hget("hanfan", "CG_LT_GL_GL04_Tie_V" + str(i))
                    if cache:
                        mapping["CG_LT_GL_GL04_Tie_V" + str(i)] = float(cache)

        logging.info("start CG_LT_GL_GL04_FCoalRate")
        start_before_4_hour = start - datetime.timedelta(hours=4)
        day = datetime.datetime(start_before_4_hour.year, start_before_4_hour.month, start_before_4_hour.day)
        hour = start_before_4_hour.hour
        shangliaoqk_2 = convert.query(gaolu_model.ShangLiaoQk, fdate=day,
                                      fhour=hour, finsid=8)
        logging.info(literalquery(shangliaoqk_2))
        shangliaoqk_2 = shangliaoqk_2.first()
        if shangliaoqk_2 is not None:
            mapping['CG_LT_GL_GL04_FCoalRate'] = float(shangliaoqk_2.fcoalrate)

        # CG_LT_GL_GL04_RLB = 前八小时的CG_LT_GL_GL04_FCokeRate + 前4小时的CG_LT_GL_GL04_FCoalRate
        if shangliaoqk_1 is not None and shangliaoqk_2 is not None:
            rlb = float(shangliaoqk_1.fcokerate) + float(shangliaoqk_2.fcoalrate)
            # ironman_redis.hset("hanfan", "CG_LT_GL_GL04_RLB", rlb)
            mapping['CG_LT_GL_GL04_RLB'] = rlb
        logging.info("end CG_LT_GL_GL04_FCoalRate")

        # CG_LT_GL_GL04_FLiLunTie(滞后时间8小时)
        logging.info("start CG_LT_GL_GL04_FLiLunTie")
        start_before_8_hour = start - datetime.timedelta(hours=8)
        day = datetime.datetime(start_before_8_hour.year, start_before_8_hour.month, start_before_8_hour.day)
        hour = start_before_8_hour.hour
        liluntie = convert.query(gaolu_model.GaoLuLiLunTie, fdate=day, fhour=hour,
                                 finsid=8)
        logging.info(literalquery(liluntie))
        liluntie = liluntie.first()
        if liluntie is not None:
            # ironman_redis.hset("hanfan", "CG_LT_GL_GL04_FLiLunTie", liluntie.fliluntie)
            mapping['CG_LT_GL_GL04_FLiLunTie'] = liluntie.fliluntie
        logging.info("end CG_LT_GL_GL04_FLiLunTie")

        logging.info("start yuanranliao_list")
        day = datetime.datetime(start.year, start.month, start.day)
        hour = start.hour
        yuanranliao_list = convert.query(gaolu_model.MBom1, fdate=day, fnote=hour, fbomtype=4) \
            .filter(gaolu_model.MBom1.fqty > 0) \
            .group_by(gaolu_model.MBom1.fitemid) \
            .with_entities(gaolu_model.MBom1.fitemid, func.any_value(gaolu_model.MBom1.fqty).label('fqty'))
        logging.info(literalquery(yuanranliao_list))

        fitemid_fqty_mapping_dict = {}
        for item in yuanranliao_list.all():
            fitemid_fqty_mapping_dict[item.fitemid] = item.fqty
        logging.info("end yuanranliao_list")

        # CG_LT_GL_GL04_Yuanranliao_Shao1jifan
        # shao1jifan = __select_hanfan_yuanranliao("CG_LT_GL_GL04_Yuanranliao_Shao1jifan", fitemid=2218, fbomtype=4)
        shao1jifan = fitemid_fqty_mapping_dict.get(2218)
        if shao1jifan is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jifan'] = float(shao1jifan)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jifan
        shao2jifan = fitemid_fqty_mapping_dict.get(2832)
        if shao2jifan is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jifan'] = float(shao2jifan)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jifan
        shao3jifan = fitemid_fqty_mapping_dict.get(2833)
        if shao3jifan is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jifan'] = float(shao3jifan)

        # CG_LT_GL_GL04_Yuanranliao_Shao56jifan
        shao56jifan = fitemid_fqty_mapping_dict.get(2835)
        if shao56jifan is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao56jifan'] = float(shao56jifan)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jipu
        shao1jipu = fitemid_fqty_mapping_dict.get(2220)
        if shao1jipu is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jipu'] = float(shao1jipu)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jipu
        shao2jipu = fitemid_fqty_mapping_dict.get(2836)
        if shao2jipu is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jipu'] = float(shao2jipu)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jipu
        shao3jipu = fitemid_fqty_mapping_dict.get(2837)
        if shao3jipu is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jipu'] = float(shao3jipu)

        # CG_LT_GL_GL04_Yuanranliao_QiuXintongMei
        qiuXintongMei = fitemid_fqty_mapping_dict.get(2864)
        if qiuXintongMei is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuXintongMei'] = float(qiuXintongMei)

        # CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei
        qiucChuangyuanMei = fitemid_fqty_mapping_dict.get(2866)
        if qiucChuangyuanMei is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei'] = float(qiucChuangyuanMei)

        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan
        qiuShuangfuFan = fitemid_fqty_mapping_dict.get(2797)
        if qiuShuangfuFan is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan'] = float(qiuShuangfuFan)

        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei
        qiuShuangfuMei = fitemid_fqty_mapping_dict.get(2865)
        if qiuShuangfuMei is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei'] = float(qiuShuangfuMei)

        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1
        qiuShuangfuMeik1 = fitemid_fqty_mapping_dict.get(2996)
        if qiuShuangfuMeik1 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1'] = float(qiuShuangfuMeik1)

        # CG_LT_GL_GL04_Yuanranliao_QiuAozhouhanfan
        qiuAozhouhanfan = fitemid_fqty_mapping_dict.get(3001)
        if qiuAozhouhanfan is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuAozhouhanfan'] = float(qiuAozhouhanfan)

        # CG_LT_GL_GL04_Yuanranliao_QiuEluosi
        qiuEluosi = fitemid_fqty_mapping_dict.get(3000)
        if qiuEluosi is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuEluosi'] = float(qiuEluosi)

        # CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila
        kuaiWeiruineila = fitemid_fqty_mapping_dict.get(2980)
        if kuaiWeiruineila is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila'] = float(kuaiWeiruineila)

        # CG_LT_GL_GL04_Yuanranliao_KuaiAokuai
        kuaiAokuai = fitemid_fqty_mapping_dict.get(2936)
        if kuaiAokuai is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiAokuai'] = float(kuaiAokuai)

        # CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB
        kuaiAokuaiPB = fitemid_fqty_mapping_dict.get(2232)
        if kuaiAokuaiPB is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB'] = float(kuaiAokuaiPB)

        # CG_LT_GL_GL04_Yuanranliao_KuaiNiuman
        kuaiNiuman = fitemid_fqty_mapping_dict.get(2990)
        if kuaiNiuman is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiNiuman'] = float(kuaiNiuman)

        # CG_LT_GL_GL04_Yuanranliao_CokeWenfeng
        cokeWenfeng = fitemid_fqty_mapping_dict.get(2274)
        if cokeWenfeng is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeWenfeng'] = float(cokeWenfeng)

        # CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi
        coke1jiganxi = fitemid_fqty_mapping_dict.get(2991)
        if coke1jiganxi is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi'] = float(coke1jiganxi)

        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan
        cokeZhongluan2qiGan = fitemid_fqty_mapping_dict.get(2799)
        if cokeZhongluan2qiGan is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan'] = float(cokeZhongluan2qiGan)

        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi
        cokeZhongluan2qiShi = fitemid_fqty_mapping_dict.get(2800)
        if cokeZhongluan2qiShi is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi'] = float(cokeZhongluan2qiShi)

        # CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi
        coke2jiganxi = fitemid_fqty_mapping_dict.get(2982)
        if coke2jiganxi is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi'] = float(coke2jiganxi)

        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiao
        coke2jijiao = fitemid_fqty_mapping_dict.get(2276)
        if coke2jijiao is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiao'] = float(coke2jijiao)

        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng
        coke2jijiaoDefeng = fitemid_fqty_mapping_dict.get(2944)
        if coke2jijiaoDefeng is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng'] = float(coke2jijiaoDefeng)

        # CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe
        coke1jiDatuhe = fitemid_fqty_mapping_dict.get(2895)
        if coke1jiDatuhe is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe'] = float(coke1jiDatuhe)

        # CG_LT_GL_GL04_Yuanranliao_CokeDefeng
        cokeDefeng = fitemid_fqty_mapping_dict.get(2963)
        if cokeDefeng is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeDefeng'] = float(cokeDefeng)

        # CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong
        cokePutong1jiDong = fitemid_fqty_mapping_dict.get(2275)
        if cokePutong1jiDong is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong'] = float(cokePutong1jiDong)

        # CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu
        cokeGengyanggaoliu = fitemid_fqty_mapping_dict.get(2931)
        if cokeGengyanggaoliu is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu'] = float(cokeGengyanggaoliu)

        # CG_LT_GL_GL04_Yuanranliao_CokeJiaoding
        cokeJiaoding = fitemid_fqty_mapping_dict.get(2277)
        if cokeJiaoding is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeJiaoding'] = float(cokeJiaoding)

        # CG_LT_GL_GL05_Yuanranliao_ZFujia
        zFujia = fitemid_fqty_mapping_dict.get(2392)
        if zFujia is not None:
            mapping['CG_LT_GL_GL05_Yuanranliao_ZFujia'] = float(zFujia)

        logging.info("start shao_1_ji_fan_list")
        # 机钒烧
        hour_in_ph = __get_hour_in_ph(hour)
        shao_1_ji_fan_list = __select_hanfan_jishao(start, HanFanStatus.JI_FAN_SHAO_WLBM, '1', hour_in_ph)
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in shao_1_ji_fan_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V
        logging.info("end shao_1_ji_fan_list")

        # CG_LT_GL_GL04_Yuanranliao_Shao1jifan_TFe
        Shao1jifan_TFe = jcxmsx_and_avg_jyjg_mapping_dict.get("TFe")
        if Shao1jifan_TFe is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jifan_TFe'] = float(Shao1jifan_TFe)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jifan_FeO
        Shao1jifan_FeO = jcxmsx_and_avg_jyjg_mapping_dict.get("FeO")
        if Shao1jifan_FeO is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jifan_FeO'] = float(Shao1jifan_FeO)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jifan_CaO
        Shao1jifan_CaO = jcxmsx_and_avg_jyjg_mapping_dict.get("CaO")
        if Shao1jifan_CaO is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jifan_CaO'] = float(Shao1jifan_CaO)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jifan_SiO2
        Shao1jifan_SiO2 = jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2")
        if Shao1jifan_SiO2 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jifan_SiO2'] = float(Shao1jifan_SiO2)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jifan_P
        Shao1jifan_P = jcxmsx_and_avg_jyjg_mapping_dict.get("P")
        if Shao1jifan_P is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jifan_P'] = float(Shao1jifan_P)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jifan_MgO
        Shao1jifan_MgO = jcxmsx_and_avg_jyjg_mapping_dict.get("MgO")
        if Shao1jifan_MgO is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jifan_MgO'] = float(Shao1jifan_MgO)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jifan_Al2O3
        Shao1jifan_Al2O3 = jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3")
        if Shao1jifan_Al2O3 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jifan_Al2O3'] = float(Shao1jifan_Al2O3)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jifan_TiO2
        Shao1jifan_TiO2 = jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2")
        if Shao1jifan_TiO2 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jifan_TiO2'] = float(Shao1jifan_TiO2)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jifan_V2O5
        Shao1jifan_V2O5 = jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5")
        if Shao1jifan_V2O5 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jifan_V2O5'] = float(Shao1jifan_V2O5)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jifan_R
        Shao1jifan_R = jcxmsx_and_avg_jyjg_mapping_dict.get("R")
        if Shao1jifan_R is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jifan_R'] = float(Shao1jifan_R)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jifan_Rzhongzhi
        Shao1jifan_Rzhongzhi = jcxmsx_and_avg_jyjg_mapping_dict.get("R中值")
        if Shao1jifan_Rzhongzhi is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jifan_Rzhongzhi'] = float(Shao1jifan_Rzhongzhi)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jifan_PinweiZhongzhi
        Shao1jifan_PinweiZhongzhi = jcxmsx_and_avg_jyjg_mapping_dict.get("P品位中值")
        if Shao1jifan_PinweiZhongzhi is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jifan_PinweiZhongzhi'] = float(Shao1jifan_PinweiZhongzhi)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jifan_ZSshaifen
        Shao1jifan_ZSshaifen = jcxmsx_and_avg_jyjg_mapping_dict.get("筛分指数")
        if Shao1jifan_ZSshaifen is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jifan_ZSshaifen'] = float(Shao1jifan_ZSshaifen)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jifan_Less10mm
        Shao1jifan_Less10mm = jcxmsx_and_avg_jyjg_mapping_dict.get("小于10mm粒度")
        if Shao1jifan_Less10mm is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jifan_Less10mm'] = float(Shao1jifan_Less10mm)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jifan_ZSzhuangu
        Shao1jifan_ZSzhuangu = jcxmsx_and_avg_jyjg_mapping_dict.get("转鼓指数")
        if Shao1jifan_ZSzhuangu is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jifan_ZSzhuangu'] = float(Shao1jifan_ZSzhuangu)

        shao_2_ji_fan_list = __select_hanfan_jishao(start, HanFanStatus.JI_FAN_SHAO_WLBM, '2', hour_in_ph)
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in shao_2_ji_fan_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_Shao2jifan_TFe
        Shao2jifan_TFe = jcxmsx_and_avg_jyjg_mapping_dict.get("TFe")
        if Shao2jifan_TFe is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jifan_TFe'] = float(Shao2jifan_TFe)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jifan_FeO
        Shao2jifan_FeO = jcxmsx_and_avg_jyjg_mapping_dict.get("FeO")
        if Shao2jifan_FeO is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jifan_FeO'] = float(Shao2jifan_FeO)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jifan_CaO
        Shao2jifan_CaO = jcxmsx_and_avg_jyjg_mapping_dict.get("CaO")
        if Shao2jifan_CaO is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jifan_CaO'] = float(Shao2jifan_CaO)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jifan_SiO2
        Shao2jifan_SiO2 = jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2")
        if Shao2jifan_SiO2 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jifan_SiO2'] = float(Shao2jifan_SiO2)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jifan_P
        Shao2jifan_P = jcxmsx_and_avg_jyjg_mapping_dict.get("P")
        if Shao2jifan_P is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jifan_P'] = float(Shao2jifan_P)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jifan_MgO
        Shao2jifan_MgO = jcxmsx_and_avg_jyjg_mapping_dict.get("MgO")
        if Shao2jifan_MgO is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jifan_MgO'] = float(Shao2jifan_MgO)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jifan_Al2O3
        Shao2jifan_Al2O3 = jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3")
        if Shao2jifan_Al2O3 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jifan_Al2O3'] = float(Shao2jifan_Al2O3)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jifan_TiO2
        Shao2jifan_TiO2 = jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2")
        if Shao2jifan_TiO2 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jifan_TiO2'] = float(Shao2jifan_TiO2)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jifan_V2O5
        Shao2jifan_V2O5 = jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5")
        if Shao2jifan_V2O5 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jifan_V2O5'] = float(Shao2jifan_V2O5)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jifan_R
        Shao2jifan_R = jcxmsx_and_avg_jyjg_mapping_dict.get("R")
        if Shao2jifan_R is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jifan_R'] = float(Shao2jifan_R)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jifan_RZhongzhi
        Shao2jifan_Rzhongzhi = jcxmsx_and_avg_jyjg_mapping_dict.get("R中值")
        if Shao2jifan_Rzhongzhi is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jifan_RZhongzhi'] = float(Shao2jifan_Rzhongzhi)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jifan_PinweiZhongzhi
        Shao2jifan_PinweiZhongzhi = jcxmsx_and_avg_jyjg_mapping_dict.get("P品位中值")
        if Shao2jifan_PinweiZhongzhi is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jifan_PinweiZhongzhi'] = float(Shao2jifan_PinweiZhongzhi)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jifan_ZSshaifen
        Shao2jifan_ZSshaifen = jcxmsx_and_avg_jyjg_mapping_dict.get("筛分指数")
        if Shao2jifan_ZSshaifen is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jifan_ZSshaifen'] = float(Shao2jifan_ZSshaifen)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jifan_Less10mm
        Shao2jifan_Less10mm = jcxmsx_and_avg_jyjg_mapping_dict.get("小于10mm粒度")
        if Shao2jifan_Less10mm is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jifan_Less10mm'] = float(Shao2jifan_Less10mm)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jifan_ZSzhuangu
        Shao2jifan_ZSzhuangu = jcxmsx_and_avg_jyjg_mapping_dict.get("转鼓指数")
        if Shao2jifan_ZSzhuangu is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jifan_ZSzhuangu'] = float(Shao2jifan_ZSzhuangu)

        shao_3_ji_fan_list = __select_hanfan_jishao(start, HanFanStatus.JI_FAN_SHAO_WLBM, '3', hour_in_ph)
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in shao_3_ji_fan_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_Shao3jifan_TFe
        Shao3jifan_TFe = jcxmsx_and_avg_jyjg_mapping_dict.get("TFe")
        if Shao3jifan_TFe is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jifan_TFe'] = float(Shao3jifan_TFe)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jifan_FeO
        Shao3jifan_FeO = jcxmsx_and_avg_jyjg_mapping_dict.get("FeO")
        if Shao3jifan_FeO is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jifan_FeO'] = float(Shao3jifan_FeO)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jifan_CaO
        Shao3jifan_CaO = jcxmsx_and_avg_jyjg_mapping_dict.get("CaO")
        if Shao3jifan_CaO is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jifan_CaO'] = float(Shao3jifan_CaO)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jifan_SiO2
        Shao3jifan_SiO2 = jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2")
        if Shao3jifan_SiO2 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jifan_SiO2'] = float(Shao3jifan_SiO2)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jifan_P
        Shao3jifan_P = jcxmsx_and_avg_jyjg_mapping_dict.get("P")
        if Shao3jifan_P is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jifan_P'] = float(Shao3jifan_P)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jifan_MgO
        Shao3jifan_MgO = jcxmsx_and_avg_jyjg_mapping_dict.get("MgO")
        if Shao3jifan_MgO is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jifan_MgO'] = float(Shao3jifan_MgO)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jifan_Al2O3
        Shao3jifan_Al2O3 = jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3")
        if Shao3jifan_Al2O3 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jifan_Al2O3'] = float(Shao3jifan_Al2O3)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jifan_TiO2
        Shao3jifan_TiO2 = jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2")
        if Shao3jifan_TiO2 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jifan_TiO2'] = float(Shao3jifan_TiO2)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jifan_V2O5
        Shao3jifan_V2O5 = jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5")
        if Shao3jifan_V2O5 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jifan_V2O5'] = float(Shao3jifan_V2O5)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jifan_R
        Shao3jifan_R = jcxmsx_and_avg_jyjg_mapping_dict.get("R")
        if Shao3jifan_R is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jifan_R'] = float(Shao3jifan_R)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jifan_RZhongzhi
        Shao3jifan_Rzhongzhi = jcxmsx_and_avg_jyjg_mapping_dict.get("R中值")
        if Shao3jifan_Rzhongzhi is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jifan_RZhongzhi'] = float(Shao3jifan_Rzhongzhi)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jifan_PinweiZhongzhi
        Shao3jifan_PinweiZhongzhi = jcxmsx_and_avg_jyjg_mapping_dict.get("P品位中值")
        if Shao3jifan_PinweiZhongzhi is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jifan_PinweiZhongzhi'] = float(Shao3jifan_PinweiZhongzhi)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jifan_ZSshaifen
        Shao3jifan_ZSshaifen = jcxmsx_and_avg_jyjg_mapping_dict.get("筛分指数")
        if Shao3jifan_ZSshaifen is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jifan_ZSshaifen'] = float(Shao3jifan_ZSshaifen)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jifan_Less10mm
        Shao3jifan_Less10mm = jcxmsx_and_avg_jyjg_mapping_dict.get("小于10mm粒度")
        if Shao3jifan_Less10mm is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jifan_Less10mm'] = float(Shao3jifan_Less10mm)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jifan_ZSzhuangu
        Shao3jifan_ZSzhuangu = jcxmsx_and_avg_jyjg_mapping_dict.get("转鼓指数")
        if Shao3jifan_ZSzhuangu is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jifan_ZSzhuangu'] = float(Shao3jifan_ZSzhuangu)

        shao_56_ji_fan_list = __select_hanfan_jishao(start, HanFanStatus.JI_FAN_SHAO_WLBM, '5', hour_in_ph)
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in shao_56_ji_fan_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_Shao56jifan_TFe
        Shao56jifan_TFe = jcxmsx_and_avg_jyjg_mapping_dict.get("TFe")
        if Shao56jifan_TFe is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao56jifan_TFe'] = float(Shao56jifan_TFe)

        # CG_LT_GL_GL04_Yuanranliao_Shao56jifan_FeO
        Shao56jifan_FeO = jcxmsx_and_avg_jyjg_mapping_dict.get("FeO")
        if Shao56jifan_FeO is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao56jifan_FeO'] = float(Shao56jifan_FeO)

        # CG_LT_GL_GL04_Yuanranliao_Shao56jifan_CaO
        Shao56jifan_CaO = jcxmsx_and_avg_jyjg_mapping_dict.get("CaO")
        if Shao56jifan_CaO is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao56jifan_CaO'] = float(Shao56jifan_CaO)

        # CG_LT_GL_GL04_Yuanranliao_Shao56jifan_SiO2
        Shao56jifan_SiO2 = jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2")
        if Shao56jifan_SiO2 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao56jifan_SiO2'] = float(Shao56jifan_SiO2)

        # CG_LT_GL_GL04_Yuanranliao_Shao56jifan_P
        Shao56jifan_P = jcxmsx_and_avg_jyjg_mapping_dict.get("P")
        if Shao56jifan_P is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao56jifan_P'] = float(Shao56jifan_P)

        # CG_LT_GL_GL04_Yuanranliao_Shao56jifan_MgO
        Shao56jifan_MgO = jcxmsx_and_avg_jyjg_mapping_dict.get("MgO")
        if Shao56jifan_MgO is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao56jifan_MgO'] = float(Shao56jifan_MgO)

        # CG_LT_GL_GL04_Yuanranliao_Shao56jifan_Al2O3
        Shao56jifan_Al2O3 = jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3")
        if Shao56jifan_Al2O3 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao56jifan_Al2O3'] = float(Shao56jifan_Al2O3)

        # CG_LT_GL_GL04_Yuanranliao_Shao56jifan_TiO2
        Shao56jifan_TiO2 = jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2")
        if Shao56jifan_TiO2 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao56jifan_TiO2'] = float(Shao56jifan_TiO2)

        # CG_LT_GL_GL04_Yuanranliao_Shao56jifan_V2O5
        Shao56jifan_V2O5 = jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5")
        if Shao56jifan_V2O5 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao56jifan_V2O5'] = float(Shao56jifan_V2O5)

        # CG_LT_GL_GL04_Yuanranliao_Shao56jifan_R
        Shao56jifan_R = jcxmsx_and_avg_jyjg_mapping_dict.get("R")
        if Shao56jifan_R is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao56jifan_R'] = float(Shao56jifan_R)

        # CG_LT_GL_GL04_Yuanranliao_Shao56jifan_RZhongzhi
        Shao56jifan_Rzhongzhi = jcxmsx_and_avg_jyjg_mapping_dict.get("R中值")
        if Shao56jifan_Rzhongzhi is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao56jifan_RZhongzhi'] = float(Shao56jifan_Rzhongzhi)

        # CG_LT_GL_GL04_Yuanranliao_Shao56jifan_PinweiZhongzhi
        Shao56jifan_PinweiZhongzhi = jcxmsx_and_avg_jyjg_mapping_dict.get("P品位中值")
        if Shao56jifan_PinweiZhongzhi is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao56jifan_PinweiZhongzhi'] = float(Shao56jifan_PinweiZhongzhi)

        # CG_LT_GL_GL04_Yuanranliao_Shao56jifan_ZSshaifen
        Shao56jifan_ZSshaifen = jcxmsx_and_avg_jyjg_mapping_dict.get("筛分指数")
        if Shao56jifan_ZSshaifen is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao56jifan_ZSshaifen'] = float(Shao56jifan_ZSshaifen)

        # CG_LT_GL_GL04_Yuanranliao_Shao56jifan_Less10mm
        Shao56jifan_Less10mm = jcxmsx_and_avg_jyjg_mapping_dict.get("小于10mm粒度")
        if Shao56jifan_Less10mm is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao56jifan_Less10mm'] = float(Shao56jifan_Less10mm)

        # CG_LT_GL_GL04_Yuanranliao_Shao56jifan_ZSzhuangu
        Shao56jifan_ZSzhuangu = jcxmsx_and_avg_jyjg_mapping_dict.get("转鼓指数")
        if Shao56jifan_ZSzhuangu is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao56jifan_ZSzhuangu'] = float(Shao56jifan_ZSzhuangu)

        # 机普烧
        shao_1_ji_pu_list = __select_hanfan_jishao(start, HanFanStatus.JI_PU_SHAO_WLBM, '1', hour_in_ph)
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in shao_1_ji_pu_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_Shao1jipu_TFe
        Shao1jipu_TFe = jcxmsx_and_avg_jyjg_mapping_dict.get("TFe")
        if Shao1jipu_TFe is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jipu_TFe'] = float(Shao1jipu_TFe)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jipu_FeO
        Shao1jipu_FeO = jcxmsx_and_avg_jyjg_mapping_dict.get("FeO")
        if Shao1jipu_FeO is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jipu_FeO'] = float(Shao1jipu_FeO)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jipu_CaO
        Shao1jipu_CaO = jcxmsx_and_avg_jyjg_mapping_dict.get("CaO")
        if Shao1jipu_CaO is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jipu_CaO'] = float(Shao1jipu_CaO)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jipu_SiO2
        Shao1jipu_SiO2 = jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2")
        if Shao1jipu_SiO2 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jipu_SiO2'] = float(Shao1jipu_SiO2)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jipu_P
        Shao1jipu_P = jcxmsx_and_avg_jyjg_mapping_dict.get("P")
        if Shao1jipu_P is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jipu_P'] = float(Shao1jipu_P)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jipu_MgO
        Shao1jipu_MgO = jcxmsx_and_avg_jyjg_mapping_dict.get("MgO")
        if Shao1jipu_MgO is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jipu_MgO'] = float(Shao1jipu_MgO)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jipu_Al2O3
        Shao1jipu_Al2O3 = jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3")
        if Shao1jipu_Al2O3 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jipu_Al2O3'] = float(Shao1jipu_Al2O3)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jipu_TiO2
        Shao1jipu_TiO2 = jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2")
        if Shao1jipu_TiO2 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jipu_TiO2'] = float(Shao1jipu_TiO2)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jipu_V2O5
        Shao1jipu_V2O5 = jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5")
        if Shao1jipu_V2O5 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jipu_V2O5'] = float(Shao1jipu_V2O5)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jipu_R
        Shao1jipu_R = jcxmsx_and_avg_jyjg_mapping_dict.get("R")
        if Shao1jipu_R is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jipu_R'] = float(Shao1jipu_R)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jipu_RZhongzhi
        Shao1jipu_RZhongzhi = jcxmsx_and_avg_jyjg_mapping_dict.get("R中值")
        if Shao1jipu_RZhongzhi is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jipu_RZhongzhi'] = float(Shao1jipu_RZhongzhi)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jipu_PinweiZhongzhi
        Shao1jipu_PinweiZhongzhi = jcxmsx_and_avg_jyjg_mapping_dict.get("P品位中值")
        if Shao1jipu_PinweiZhongzhi is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jipu_PinweiZhongzhi'] = float(Shao1jipu_PinweiZhongzhi)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jipu_ZSshaifen
        Shao1jipu_ZSshaifen = jcxmsx_and_avg_jyjg_mapping_dict.get("筛分指数")
        if Shao1jipu_ZSshaifen is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jipu_ZSshaifen'] = float(Shao1jipu_ZSshaifen)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jipu_Less10mm
        Shao1jipu_Less10mm = jcxmsx_and_avg_jyjg_mapping_dict.get("小于10mm粒度")
        if Shao1jipu_Less10mm is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jipu_Less10mm'] = float(Shao1jipu_Less10mm)

        # CG_LT_GL_GL04_Yuanranliao_Shao1jipu_ZSzhuangu
        Shao1jipu_ZSzhuangu = jcxmsx_and_avg_jyjg_mapping_dict.get("转鼓指数")
        if Shao1jipu_ZSzhuangu is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao1jipu_ZSzhuangu'] = float(Shao1jipu_ZSzhuangu)

        shao_2_ji_pu_list = __select_hanfan_jishao(start, HanFanStatus.JI_PU_SHAO_WLBM, '2', hour_in_ph)
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in shao_2_ji_pu_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_Shao2jipu_TFe
        Shao2jipu_TFe = jcxmsx_and_avg_jyjg_mapping_dict.get("TFe")
        if Shao2jipu_TFe is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jipu_TFe'] = float(Shao2jipu_TFe)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jipu_FeO
        Shao2jipu_FeO = jcxmsx_and_avg_jyjg_mapping_dict.get("FeO")
        if Shao2jipu_FeO is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jipu_FeO'] = float(Shao2jipu_FeO)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jipu_CaO
        Shao2jipu_CaO = jcxmsx_and_avg_jyjg_mapping_dict.get("CaO")
        if Shao2jipu_CaO is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jipu_CaO'] = float(Shao2jipu_CaO)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jipu_SiO2
        Shao2jipu_SiO2 = jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2")
        if Shao2jipu_SiO2 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jipu_SiO2'] = float(Shao2jipu_SiO2)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jipu_P
        Shao2jipu_P = jcxmsx_and_avg_jyjg_mapping_dict.get("P")
        if Shao2jipu_P is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jipu_P'] = float(Shao2jipu_P)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jipu_MgO
        Shao2jipu_MgO = jcxmsx_and_avg_jyjg_mapping_dict.get("MgO")
        if Shao2jipu_MgO is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jipu_MgO'] = float(Shao2jipu_MgO)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jipu_Al2O3
        Shao2jipu_Al2O3 = jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3")
        if Shao2jipu_Al2O3 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jipu_Al2O3'] = float(Shao2jipu_Al2O3)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jipu_TiO2
        Shao2jipu_TiO2 = jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2")
        if Shao2jipu_TiO2 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jipu_TiO2'] = float(Shao2jipu_TiO2)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jipu_V2O5
        Shao2jipu_V2O5 = jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5")
        if Shao2jipu_V2O5 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jipu_V2O5'] = float(Shao2jipu_V2O5)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jipu_R
        Shao2jipu_R = jcxmsx_and_avg_jyjg_mapping_dict.get("R")
        if Shao2jipu_R is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jipu_R'] = float(Shao2jipu_R)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jipu_RZhongzhi
        Shao2jipu_RZhongzhi = jcxmsx_and_avg_jyjg_mapping_dict.get("R中值")
        if Shao2jipu_RZhongzhi is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jipu_RZhongzhi'] = float(Shao2jipu_RZhongzhi)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jipu_PinweiZhongzhi
        Shao2jipu_PinweiZhongzhi = jcxmsx_and_avg_jyjg_mapping_dict.get("P品位中值")
        if Shao2jipu_PinweiZhongzhi is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jipu_PinweiZhongzhi'] = float(Shao2jipu_PinweiZhongzhi)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jipu_ZSshaifen
        Shao2jipu_ZSshaifen = jcxmsx_and_avg_jyjg_mapping_dict.get("筛分指数")
        if Shao2jipu_ZSshaifen is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jipu_ZSshaifen'] = float(Shao2jipu_ZSshaifen)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jipu_Less10mm
        Shao2jipu_Less10mm = jcxmsx_and_avg_jyjg_mapping_dict.get("小于10mm粒度")
        if Shao2jipu_Less10mm is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jipu_Less10mm'] = float(Shao2jipu_Less10mm)

        # CG_LT_GL_GL04_Yuanranliao_Shao2jipu_ZSzhuangu
        Shao2jipu_ZSzhuangu = jcxmsx_and_avg_jyjg_mapping_dict.get("转鼓指数")
        if Shao2jipu_ZSzhuangu is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao2jipu_ZSzhuangu'] = float(Shao2jipu_ZSzhuangu)

        shao_3_ji_pu_list = __select_hanfan_jishao(start, HanFanStatus.JI_PU_SHAO_WLBM, '3', hour_in_ph)
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in shao_3_ji_pu_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_Shao3jipu_TFe
        Shao3jipu_TFe = jcxmsx_and_avg_jyjg_mapping_dict.get("TFe")
        if Shao3jipu_TFe is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jipu_TFe'] = float(Shao3jipu_TFe)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jipu_FeO
        Shao3jipu_FeO = jcxmsx_and_avg_jyjg_mapping_dict.get("FeO")
        if Shao3jipu_FeO is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jipu_FeO'] = float(Shao3jipu_FeO)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jipu_CaO
        Shao3jipu_CaO = jcxmsx_and_avg_jyjg_mapping_dict.get("CaO")
        if Shao3jipu_CaO is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jipu_CaO'] = float(Shao3jipu_CaO)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jipu_SiO2
        Shao3jipu_SiO2 = jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2")
        if Shao3jipu_SiO2 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jipu_SiO2'] = float(Shao3jipu_SiO2)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jipu_P
        Shao3jipu_P = jcxmsx_and_avg_jyjg_mapping_dict.get("P")
        if Shao3jipu_P is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jipu_P'] = float(Shao3jipu_P)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jipu_MgO
        Shao3jipu_MgO = jcxmsx_and_avg_jyjg_mapping_dict.get("MgO")
        if Shao3jipu_MgO is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jipu_MgO'] = float(Shao3jipu_MgO)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jipu_Al2O3
        Shao3jipu_Al2O3 = jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3")
        if Shao3jipu_Al2O3 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jipu_Al2O3'] = float(Shao3jipu_Al2O3)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jipu_TiO2
        Shao3jipu_TiO2 = jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2")
        if Shao3jipu_TiO2 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jipu_TiO2'] = float(Shao3jipu_TiO2)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jipu_V2O5
        Shao3jipu_V2O5 = jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5")
        if Shao3jipu_V2O5 is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jipu_V2O5'] = float(Shao3jipu_V2O5)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jipu_R
        Shao3jipu_R = jcxmsx_and_avg_jyjg_mapping_dict.get("R")
        if Shao3jipu_R is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jipu_R'] = float(Shao3jipu_R)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jipu_RZhongzhi
        Shao3jipu_RZhongzhi = jcxmsx_and_avg_jyjg_mapping_dict.get("R中值")
        if Shao3jipu_RZhongzhi is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jipu_RZhongzhi'] = float(Shao3jipu_RZhongzhi)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jipu_PinweiZhongzhi
        Shao3jipu_PinweiZhongzhi = jcxmsx_and_avg_jyjg_mapping_dict.get("P品位中值")
        if Shao3jipu_PinweiZhongzhi is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jipu_PinweiZhongzhi'] = float(Shao3jipu_PinweiZhongzhi)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jipu_ZSshaifen
        Shao3jipu_ZSshaifen = jcxmsx_and_avg_jyjg_mapping_dict.get("筛分指数")
        if Shao3jipu_ZSshaifen is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jipu_ZSshaifen'] = float(Shao3jipu_ZSshaifen)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jipu_Less10mm
        Shao3jipu_Less10mm = jcxmsx_and_avg_jyjg_mapping_dict.get("小于10mm粒度")
        if Shao3jipu_Less10mm is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jipu_Less10mm'] = float(Shao3jipu_Less10mm)

        # CG_LT_GL_GL04_Yuanranliao_Shao3jipu_ZSzhuangu
        Shao3jipu_ZSzhuangu = jcxmsx_and_avg_jyjg_mapping_dict.get("转鼓指数")
        if Shao3jipu_ZSzhuangu is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Shao3jipu_ZSzhuangu'] = float(Shao3jipu_ZSzhuangu)

        # 澳洲含钒球团
        ZB_qiu_aozhou_hanfan_list = __select_hanfan_yuanranliao_qiuTuan(start, HanFanStatus.ZB_QIU_AOZHOU_HANFAN_WLBM,
                                                                        '596')
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in ZB_qiu_aozhou_hanfan_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V
        # CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_TFe
        if jcxmsx_and_avg_jyjg_mapping_dict.get("TFe") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_TFe'] = jcxmsx_and_avg_jyjg_mapping_dict.get("TFe")

        # CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_FeO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("FeO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_FeO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("FeO")

        # CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_CaO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CaO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_CaO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CaO")

        # CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_SiO2
        if jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_SiO2'] = jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2")
        # CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_MgO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("MgO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_MgO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("MgO")

        # CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_Al2O3
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_Al2O3'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3")

        # CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_TiO2
        if jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_TiO2'] = jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2")

        # CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_V2O5
        if jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_V2O5'] = jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5")
        # CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_P
        if jcxmsx_and_avg_jyjg_mapping_dict.get("P") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_P'] = jcxmsx_and_avg_jyjg_mapping_dict.get("P")
        # CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_S
        if jcxmsx_and_avg_jyjg_mapping_dict.get("S") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_S'] = jcxmsx_and_avg_jyjg_mapping_dict.get("S")
        # CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_H2O
        if jcxmsx_and_avg_jyjg_mapping_dict.get("H2O") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_H2O'] = jcxmsx_and_avg_jyjg_mapping_dict.get("H2O")
        # CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_QDkangya
        if jcxmsx_and_avg_jyjg_mapping_dict.get("抗压强度") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_QDkangya'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "抗压强度")
        # CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_ZSshaifen
        if jcxmsx_and_avg_jyjg_mapping_dict.get("筛分指数") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_ZSshaifen'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "筛分指数")
        # CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_ZSzhuangu
        if jcxmsx_and_avg_jyjg_mapping_dict.get("转鼓指数") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan_ZSzhuangu'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "转鼓指数")

        # 双福球(钒)
        qiu_shuang_fu_fan_list = __select_hanfan_yuanranliao_qiukuaikuang(start, HanFanStatus.QIU_SHAUNGFU_FAN_WLBM,
                                                                          '186', 'CC117', '26133')
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in qiu_shuang_fu_fan_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_TFe
        if jcxmsx_and_avg_jyjg_mapping_dict.get("TFe") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_TFe'] = jcxmsx_and_avg_jyjg_mapping_dict.get("TFe")

        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_FeO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("FeO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_FeO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("FeO")

        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_CaO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CaO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_CaO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CaO")

        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_SiO2
        if jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_SiO2'] = jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2")
        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_MgO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("MgO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_MgO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("MgO")

        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_Al2O3
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_Al2O3'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3")

        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_TiO2
        if jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_TiO2'] = jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2")

        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_V2O5
        if jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_V2O5'] = jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5")
        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_P
        if jcxmsx_and_avg_jyjg_mapping_dict.get("P") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_P'] = jcxmsx_and_avg_jyjg_mapping_dict.get("P")
        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_S
        if jcxmsx_and_avg_jyjg_mapping_dict.get("S") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_S'] = jcxmsx_and_avg_jyjg_mapping_dict.get("S")
        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_H2O
        if jcxmsx_and_avg_jyjg_mapping_dict.get("H2O") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_H2O'] = jcxmsx_and_avg_jyjg_mapping_dict.get("H2O")
        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_QDkangya
        if jcxmsx_and_avg_jyjg_mapping_dict.get("抗压强度") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_QDkangya'] = jcxmsx_and_avg_jyjg_mapping_dict.get("抗压强度")
        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_ZSshaifen
        if jcxmsx_and_avg_jyjg_mapping_dict.get("筛分指数") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_ZSshaifen'] = jcxmsx_and_avg_jyjg_mapping_dict.get("筛分指数")
        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_ZSzhuangu
        if jcxmsx_and_avg_jyjg_mapping_dict.get("转鼓指数") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan_ZSzhuangu'] = jcxmsx_and_avg_jyjg_mapping_dict.get("转鼓指数")
        # 创远球(镁)
        qiu_chuang_yuan_mei_list = __select_hanfan_yuanranliao_qiukuaikuang(start, HanFanStatus.QIU_CHUANGYUAN_MEI_WLBM,
                                                                            '607', 'CC117', '35533')
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in qiu_chuang_yuan_mei_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_TFe
        if jcxmsx_and_avg_jyjg_mapping_dict.get("TFe") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_TFe'] = jcxmsx_and_avg_jyjg_mapping_dict.get("TFe")

        # CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_FeO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("FeO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_FeO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("FeO")

        # CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_CaO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CaO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_CaO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CaO")

        # CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_SiO2
        if jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_SiO2'] = jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2")
        # CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_MgO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("MgO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_MgO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("MgO")

        # CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_Al2O3
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_Al2O3'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3")

        # CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_TiO2
        if jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_TiO2'] = jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2")

        # CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_V2O5
        if jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_V2O5'] = jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5")
        # CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_P
        if jcxmsx_and_avg_jyjg_mapping_dict.get("P") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_P'] = jcxmsx_and_avg_jyjg_mapping_dict.get("P")
        # CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_S
        if jcxmsx_and_avg_jyjg_mapping_dict.get("S") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_S'] = jcxmsx_and_avg_jyjg_mapping_dict.get("S")
        # CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_H2O
        if jcxmsx_and_avg_jyjg_mapping_dict.get("H2O") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_H2O'] = jcxmsx_and_avg_jyjg_mapping_dict.get("H2O")
        # CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_QDkangya
        if jcxmsx_and_avg_jyjg_mapping_dict.get("抗压强度") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_QDkangya'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "抗压强度")
        # CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_ZSshaifen
        if jcxmsx_and_avg_jyjg_mapping_dict.get("筛分指数") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_ZSshaifen'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "筛分指数")
        # CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_ZSzhuangu
        if jcxmsx_and_avg_jyjg_mapping_dict.get("转鼓指数") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei_ZSzhuangu'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "转鼓指数")

        # 双福球(镁)
        qiu_shuang_fu_mei_list = __select_hanfan_yuanranliao_qiukuaikuang(start, HanFanStatus.QIU_CHUANGYUAN_MEI_WLBM,
                                                                          '607', 'CC117', '26133')
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in qiu_shuang_fu_mei_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_TFe
        if jcxmsx_and_avg_jyjg_mapping_dict.get("TFe") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_TFe'] = jcxmsx_and_avg_jyjg_mapping_dict.get("TFe")

        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_FeO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("FeO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_FeO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("FeO")

        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_CaO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CaO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_CaO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CaO")

        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_SiO2
        if jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_SiO2'] = jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2")
        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_MgO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("MgO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_MgO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("MgO")

        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_Al2O3
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_Al2O3'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3")

        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_TiO2
        if jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_TiO2'] = jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2")

        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_V2O5
        if jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_V2O5'] = jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5")
        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_P
        if jcxmsx_and_avg_jyjg_mapping_dict.get("P") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_P'] = jcxmsx_and_avg_jyjg_mapping_dict.get("P")
        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_S
        if jcxmsx_and_avg_jyjg_mapping_dict.get("S") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_S'] = jcxmsx_and_avg_jyjg_mapping_dict.get("S")
        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_H2O
        if jcxmsx_and_avg_jyjg_mapping_dict.get("H2O") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_H2O'] = jcxmsx_and_avg_jyjg_mapping_dict.get("H2O")
        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_QDkangya
        if jcxmsx_and_avg_jyjg_mapping_dict.get("抗压强度") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_QDkangya'] = jcxmsx_and_avg_jyjg_mapping_dict.get("抗压强度")
        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_ZSshaifen
        if jcxmsx_and_avg_jyjg_mapping_dict.get("筛分指数") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_ZSshaifen'] = jcxmsx_and_avg_jyjg_mapping_dict.get("筛分指数")
        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_ZSzhuangu
        if jcxmsx_and_avg_jyjg_mapping_dict.get("转鼓指数") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei_ZSzhuangu'] = jcxmsx_and_avg_jyjg_mapping_dict.get("转鼓指数")

        # 球团矿(俄罗斯)
        qiu_tuan_kuang_list = __select_hanfan_yuanranliao_qiuTuan(start, HanFanStatus.QIU_TUAN_KUANG_ELUOSI_MEI_WLBM,
                                                                  '179')
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in qiu_tuan_kuang_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_QiuEluosi_TFe
        if jcxmsx_and_avg_jyjg_mapping_dict.get("TFe") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuEluosi_TFe'] = jcxmsx_and_avg_jyjg_mapping_dict.get("TFe")

        # CG_LT_GL_GL04_Yuanranliao_QiuEluosi_FeO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("FeO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuEluosi_FeO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("FeO")

        # CG_LT_GL_GL04_Yuanranliao_QiuEluosi_CaO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CaO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuEluosi_CaO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CaO")

        # CG_LT_GL_GL04_Yuanranliao_QiuEluosi_SiO2
        if jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuEluosi_SiO2'] = jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2")
        # CG_LT_GL_GL04_Yuanranliao_QiuEluosi_MgO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("MgO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuEluosi_MgO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("MgO")

        # CG_LT_GL_GL04_Yuanranliao_QiuEluosi_Al2O3
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuEluosi_Al2O3'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3")

        # CG_LT_GL_GL04_Yuanranliao_QiuEluosi_TiO2
        if jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuEluosi_TiO2'] = jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2")

        # CG_LT_GL_GL04_Yuanranliao_QiuEluosi_V2O5
        if jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuEluosi_V2O5'] = jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5")
        # CG_LT_GL_GL04_Yuanranliao_QiuEluosi_P
        if jcxmsx_and_avg_jyjg_mapping_dict.get("P") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuEluosi_P'] = jcxmsx_and_avg_jyjg_mapping_dict.get("P")
        # CG_LT_GL_GL04_Yuanranliao_QiuEluosi_S
        if jcxmsx_and_avg_jyjg_mapping_dict.get("S") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuEluosi_S'] = jcxmsx_and_avg_jyjg_mapping_dict.get("S")
        # CG_LT_GL_GL04_Yuanranliao_QiuEluosi_H2O
        if jcxmsx_and_avg_jyjg_mapping_dict.get("H2O") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuEluosi_H2O'] = jcxmsx_and_avg_jyjg_mapping_dict.get("H2O")
        # CG_LT_GL_GL04_Yuanranliao_QiuEluosi_QDkangya
        if jcxmsx_and_avg_jyjg_mapping_dict.get("抗压强度") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuEluosi_QDkangya'] = jcxmsx_and_avg_jyjg_mapping_dict.get("抗压强度")
        # CG_LT_GL_GL04_Yuanranliao_QiuEluosi_ZSshaifen
        if jcxmsx_and_avg_jyjg_mapping_dict.get("筛分指数") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuEluosi_ZSshaifen'] = jcxmsx_and_avg_jyjg_mapping_dict.get("筛分指数")
        # CG_LT_GL_GL04_Yuanranliao_QiuEluosi_ZSzhuangu
        if jcxmsx_and_avg_jyjg_mapping_dict.get("转鼓指数") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuEluosi_ZSzhuangu'] = jcxmsx_and_avg_jyjg_mapping_dict.get("转鼓指数")

        # 信通球(镁)
        xin_tong_qiu_mei_list = __select_hanfan_yuanranliao_qiukuaikuang(start, HanFanStatus.QIU_CHUANGYUAN_MEI_WLBM,
                                                                         '607', 'CC117', '23406')
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in xin_tong_qiu_mei_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_TFe
        if jcxmsx_and_avg_jyjg_mapping_dict.get("TFe") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_TFe'] = jcxmsx_and_avg_jyjg_mapping_dict.get("TFe")

        # CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_FeO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("FeO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_FeO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("FeO")

        # CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_CaO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CaO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_CaO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CaO")

        # CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_SiO2
        if jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_SiO2'] = jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2")
        # CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_MgO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("MgO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_MgO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("MgO")

        # CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_Al2O3
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_Al2O3'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3")

        # CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_TiO2
        if jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_TiO2'] = jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2")

        # CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_V2O5
        if jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_V2O5'] = jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5")
        # CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_P
        if jcxmsx_and_avg_jyjg_mapping_dict.get("P") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_P'] = jcxmsx_and_avg_jyjg_mapping_dict.get("P")
        # CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_S
        if jcxmsx_and_avg_jyjg_mapping_dict.get("S") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_S'] = jcxmsx_and_avg_jyjg_mapping_dict.get("S")
        # CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_H2O
        if jcxmsx_and_avg_jyjg_mapping_dict.get("H2O") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_H2O'] = jcxmsx_and_avg_jyjg_mapping_dict.get("H2O")
        # CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_QDkangya
        if jcxmsx_and_avg_jyjg_mapping_dict.get("抗压强度") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_QDkangya'] = jcxmsx_and_avg_jyjg_mapping_dict.get("抗压强度")
        # CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_ZSshaifen
        if jcxmsx_and_avg_jyjg_mapping_dict.get("筛分指数") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_ZSshaifen'] = jcxmsx_and_avg_jyjg_mapping_dict.get("筛分指数")
        # CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_ZSzhuangu
        if jcxmsx_and_avg_jyjg_mapping_dict.get("转鼓指数") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuXintongMei_ZSzhuangu'] = jcxmsx_and_avg_jyjg_mapping_dict.get("转鼓指数")

        # 双福球(镁矿1)
        qiu_shuang_fu_mei_k1_list = __select_hanfan_yuanranliao_qiukuaikuang(start,
                                                                             HanFanStatus.QIU_SHUANGFU_MEI_KUANG_1_WLBM,
                                                                             '618', 'CC117', '26133')
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in qiu_shuang_fu_mei_k1_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_TFe
        if jcxmsx_and_avg_jyjg_mapping_dict.get("TFe") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_TFe'] = jcxmsx_and_avg_jyjg_mapping_dict.get("TFe")

        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_FeO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("FeO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_FeO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("FeO")

        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_CaO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CaO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_CaO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CaO")

        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_SiO2
        if jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_SiO2'] = jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2")
        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_MgO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("MgO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_MgO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("MgO")

        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_Al2O3
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_Al2O3'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3")

        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_TiO2
        if jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_TiO2'] = jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2")

        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_V2O5
        if jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_V2O5'] = jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5")
        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_P
        if jcxmsx_and_avg_jyjg_mapping_dict.get("P") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_P'] = jcxmsx_and_avg_jyjg_mapping_dict.get("P")
        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_S
        if jcxmsx_and_avg_jyjg_mapping_dict.get("S") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_S'] = jcxmsx_and_avg_jyjg_mapping_dict.get("S")
        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_H2O
        if jcxmsx_and_avg_jyjg_mapping_dict.get("H2O") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_H2O'] = jcxmsx_and_avg_jyjg_mapping_dict.get("H2O")
        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_QDkangya
        if jcxmsx_and_avg_jyjg_mapping_dict.get("抗压强度") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_QDkangya'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "抗压强度")
        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_ZSshaifen
        if jcxmsx_and_avg_jyjg_mapping_dict.get("筛分指数") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_ZSshaifen'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "筛分指数")
        # CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_ZSzhuangu
        if jcxmsx_and_avg_jyjg_mapping_dict.get("转鼓指数") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1_ZSzhuangu'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "转鼓指数")

        # 澳块
        kuai_ao_kuai_list = __select_hanfan_yuanranliao_qiukuaikuang_without_provider_code(start,
                                                                                           HanFanStatus.KUAI_AO_KUAI_WLBM,
                                                                                           '628', 'CC117')
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in kuai_ao_kuai_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_TFe
        if jcxmsx_and_avg_jyjg_mapping_dict.get("TFe") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_TFe'] = jcxmsx_and_avg_jyjg_mapping_dict.get("TFe")

        # CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_CaO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CaO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_CaO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CaO")

        # CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_SiO2
        if jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_SiO2'] = jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2")
        # CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_Al2O3
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_Al2O3'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3")

        # CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_TiO2
        if jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_TiO2'] = jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2")

        # CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_V2O5
        if jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_V2O5'] = jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5")
        # CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_P
        if jcxmsx_and_avg_jyjg_mapping_dict.get("P") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_P'] = jcxmsx_and_avg_jyjg_mapping_dict.get("P")
        # CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_S
        if jcxmsx_and_avg_jyjg_mapping_dict.get("S") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_S'] = jcxmsx_and_avg_jyjg_mapping_dict.get("S")
        # CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_H2O
        if jcxmsx_and_avg_jyjg_mapping_dict.get("H2O") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiAokuai_H2O'] = jcxmsx_and_avg_jyjg_mapping_dict.get("H2O")

        # 澳块PB
        kuai_ao_kuai_pb_list = __select_hanfan_yuanranliao_qiukuaikuang_without_provider_code(start,
                                                                                              HanFanStatus.KUAI_AO_KUANG_PB_WLBM,
                                                                                              '536', 'CC117')
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in kuai_ao_kuai_pb_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_TFe
        if jcxmsx_and_avg_jyjg_mapping_dict.get("TFe") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_TFe'] = jcxmsx_and_avg_jyjg_mapping_dict.get("TFe")

        # CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_CaO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CaO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_CaO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CaO")

        # CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_SiO2
        if jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_SiO2'] = jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2")
        # CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_Al2O3
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_Al2O3'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3")

        # CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_TiO2
        if jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_TiO2'] = jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2")

        # CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_V2O5
        if jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_V2O5'] = jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5")
        # CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_P
        if jcxmsx_and_avg_jyjg_mapping_dict.get("P") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_P'] = jcxmsx_and_avg_jyjg_mapping_dict.get("P")
        # CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_S
        if jcxmsx_and_avg_jyjg_mapping_dict.get("S") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_S'] = jcxmsx_and_avg_jyjg_mapping_dict.get("S")
        # CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_H2O
        if jcxmsx_and_avg_jyjg_mapping_dict.get("H2O") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB_H2O'] = jcxmsx_and_avg_jyjg_mapping_dict.get("H2O")

        # 纽曼块
        niu_man_kuai_list = __select_hanfan_yuanranliao_qiukuaikuang_without_provider_code(start,
                                                                                           HanFanStatus.KUAI_NIU_MAN_PB_WLBM,
                                                                                           '536', 'CC117')
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in niu_man_kuai_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_KuaiNiuman_TFe
        if jcxmsx_and_avg_jyjg_mapping_dict.get("TFe") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiNiuman_TFe'] = jcxmsx_and_avg_jyjg_mapping_dict.get("TFe")

        # CG_LT_GL_GL04_Yuanranliao_KuaiNiuman_CaO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CaO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiNiuman_CaO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CaO")

        # CG_LT_GL_GL04_Yuanranliao_KuaiNiuman_SiO2
        if jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiNiuman_SiO2'] = jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2")
        # CG_LT_GL_GL04_Yuanranliao_KuaiNiuman_Al2O3
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiNiuman_Al2O3'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3")

        # CG_LT_GL_GL04_Yuanranliao_KuaiNiuman_TiO2
        if jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiNiuman_TiO2'] = jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2")

        # CG_LT_GL_GL04_Yuanranliao_KuaiNiuman_V2O5
        if jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiNiuman_V2O5'] = jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5")
        # CG_LT_GL_GL04_Yuanranliao_KuaiNiuman_P
        if jcxmsx_and_avg_jyjg_mapping_dict.get("P") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiNiuman_P'] = jcxmsx_and_avg_jyjg_mapping_dict.get("P")
        # CG_LT_GL_GL04_Yuanranliao_KuaiNiuman_S
        if jcxmsx_and_avg_jyjg_mapping_dict.get("S") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiNiuman_S'] = jcxmsx_and_avg_jyjg_mapping_dict.get("S")
        # CG_LT_GL_GL04_Yuanranliao_KuaiNiuman_H2O
        if jcxmsx_and_avg_jyjg_mapping_dict.get("H2O") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiNiuman_H2O'] = jcxmsx_and_avg_jyjg_mapping_dict.get("H2O")

        # 委瑞内拉块
        weiruineila_kuai_list = __select_hanfan_yuanranliao_qiukuaikuang_without_provider_code(start,
                                                                                               HanFanStatus.KUAI_WEIRUINEILA_KUAI_WLBM,
                                                                                               '856', 'CC117')
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in weiruineila_kuai_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_TFe
        if jcxmsx_and_avg_jyjg_mapping_dict.get("TFe") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_TFe'] = jcxmsx_and_avg_jyjg_mapping_dict.get("TFe")

        # CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_CaO
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CaO") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_CaO'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CaO")

        # CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_SiO2
        if jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_SiO2'] = jcxmsx_and_avg_jyjg_mapping_dict.get("SiO2")
        # CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_Al2O3
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_Al2O3'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Al2O3")

        # CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_TiO2
        if jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_TiO2'] = jcxmsx_and_avg_jyjg_mapping_dict.get("TiO2")

        # CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_V2O5
        if jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_V2O5'] = jcxmsx_and_avg_jyjg_mapping_dict.get("V2O5")
        # CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_P
        if jcxmsx_and_avg_jyjg_mapping_dict.get("P") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_P'] = jcxmsx_and_avg_jyjg_mapping_dict.get("P")
        # CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_S
        if jcxmsx_and_avg_jyjg_mapping_dict.get("S") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_S'] = jcxmsx_and_avg_jyjg_mapping_dict.get("S")
        # CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_H2O
        if jcxmsx_and_avg_jyjg_mapping_dict.get("H2O") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila_H2O'] = jcxmsx_and_avg_jyjg_mapping_dict.get("H2O")

        # 大土河一级焦
        data_list = __select_hanfan_yuanranliao_qiukuaikuang(start, HanFanStatus.COKE_1_JI_DATUHE,
                                                             '110', '574', "42805")
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in data_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_Ad
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Ad") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_Ad'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Ad")

        # CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_FCad
        if jcxmsx_and_avg_jyjg_mapping_dict.get("FCad") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_FCad'] = jcxmsx_and_avg_jyjg_mapping_dict.get("FCad")

        # CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_VDaf
        if jcxmsx_and_avg_jyjg_mapping_dict.get("VDaf") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_VDaf'] = jcxmsx_and_avg_jyjg_mapping_dict.get("VDaf")
        # CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_Std
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Std") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_Std'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Std")

        # CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_CRI
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CRI") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_CRI'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CRI")

        # CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_CSR
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CSR") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_CSR'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CSR")
        # CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_H2O
        if jcxmsx_and_avg_jyjg_mapping_dict.get("H2O") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_H2O'] = jcxmsx_and_avg_jyjg_mapping_dict.get("H2O")
        # CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_M10
        if jcxmsx_and_avg_jyjg_mapping_dict.get("M10") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_M10'] = jcxmsx_and_avg_jyjg_mapping_dict.get("M10")
        # CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_M40
        if jcxmsx_and_avg_jyjg_mapping_dict.get("M40") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_M40'] = jcxmsx_and_avg_jyjg_mapping_dict.get("M40")
        # CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_Less25mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("小于25mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_Less25mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get("小于25mm")
        # CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_Greater40mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于40mm粒度") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_Greater40mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于40mm粒度")
        # CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_Greater60mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于60mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_Greater60mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于60mm")
        # CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_Greater80mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于80mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe_Greater80mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于80mm")

        # 德丰焦炭
        data_list = __select_hanfan_yuanranliao_qiukuaikuang(start, HanFanStatus.COKE_1_JI_DATUHE,
                                                             '110', '574', "39381")
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in data_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_CokeDefeng_Ad
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Ad") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeDefeng_Ad'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Ad")

        # CG_LT_GL_GL04_Yuanranliao_CokeDefeng_FCad
        if jcxmsx_and_avg_jyjg_mapping_dict.get("FCad") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeDefeng_FCad'] = jcxmsx_and_avg_jyjg_mapping_dict.get("FCad")

        # CG_LT_GL_GL04_Yuanranliao_CokeDefeng_VDaf
        if jcxmsx_and_avg_jyjg_mapping_dict.get("VDaf") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeDefeng_VDaf'] = jcxmsx_and_avg_jyjg_mapping_dict.get("VDaf")
        # CG_LT_GL_GL04_Yuanranliao_CokeDefeng_Std
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Std") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeDefeng_Std'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Std")

        # CG_LT_GL_GL04_Yuanranliao_CokeDefeng_CRI
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CRI") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeDefeng_CRI'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CRI")

        # CG_LT_GL_GL04_Yuanranliao_CokeDefeng_CSR
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CSR") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeDefeng_CSR'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CSR")
        # CG_LT_GL_GL04_Yuanranliao_CokeDefeng_H2O
        if jcxmsx_and_avg_jyjg_mapping_dict.get("H2O") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeDefeng_H2O'] = jcxmsx_and_avg_jyjg_mapping_dict.get("H2O")
        # CG_LT_GL_GL04_Yuanranliao_CokeDefeng_M10
        if jcxmsx_and_avg_jyjg_mapping_dict.get("M10") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeDefeng_M10'] = jcxmsx_and_avg_jyjg_mapping_dict.get("M10")
        # CG_LT_GL_GL04_Yuanranliao_CokeDefeng_M40
        if jcxmsx_and_avg_jyjg_mapping_dict.get("M40") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeDefeng_M40'] = jcxmsx_and_avg_jyjg_mapping_dict.get("M40")
        # CG_LT_GL_GL04_Yuanranliao_CokeDefeng_Less25mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("小于25mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeDefeng_Less25mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get("小于25mm")
        # CG_LT_GL_GL04_Yuanranliao_CokeDefeng_Greater40mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于40mm粒度") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeDefeng_Greater40mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于40mm粒度")
        # CG_LT_GL_GL04_Yuanranliao_CokeDefeng_Greater60mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于60mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeDefeng_Greater60mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get("大于60mm")
        # CG_LT_GL_GL04_Yuanranliao_CokeDefeng_Greater80mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于80mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeDefeng_Greater80mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get("大于80mm")

        # 二级干熄焦
        data_list = __select_hanfan_yuanranliao_qiukuaikuang_without_provider_code(start, HanFanStatus.COKE_2_JI_GANXI,
                                                                                   '723', '574')
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in data_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_Ad
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Ad") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_Ad'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Ad")

        # CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_FCad
        if jcxmsx_and_avg_jyjg_mapping_dict.get("FCad") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_FCad'] = jcxmsx_and_avg_jyjg_mapping_dict.get("FCad")

        # CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_VDaf
        if jcxmsx_and_avg_jyjg_mapping_dict.get("VDaf") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_VDaf'] = jcxmsx_and_avg_jyjg_mapping_dict.get("VDaf")
        # CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_Std
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Std") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_Std'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Std")

        # CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_CRI
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CRI") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_CRI'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CRI")

        # CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_CSR
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CSR") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_CSR'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CSR")
        # CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_H2O
        if jcxmsx_and_avg_jyjg_mapping_dict.get("H2O") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_H2O'] = jcxmsx_and_avg_jyjg_mapping_dict.get("H2O")
        # CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_M10
        if jcxmsx_and_avg_jyjg_mapping_dict.get("M10") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_M10'] = jcxmsx_and_avg_jyjg_mapping_dict.get("M10")
        # CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_M40
        if jcxmsx_and_avg_jyjg_mapping_dict.get("M40") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_M40'] = jcxmsx_and_avg_jyjg_mapping_dict.get("M40")
        # CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_Less25mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("小于25mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_Less25mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get("小于25mm")
        # CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_Greater40mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于40mm粒度") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_Greater40mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于40mm粒度")
        # CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_Greater60mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于60mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_Greater60mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于60mm")
        # CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_Greater80mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于80mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi_Greater80mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于80mm")

        # 二级焦
        data_list = __select_hanfan_yuanranliao_qiukuaikuang(start, HanFanStatus.COKE_2_JI_GANXI,
                                                             '113', '574', "41825")
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in data_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_Ad
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Ad") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_Ad'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Ad")

        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_FCad
        if jcxmsx_and_avg_jyjg_mapping_dict.get("FCad") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_FCad'] = jcxmsx_and_avg_jyjg_mapping_dict.get("FCad")

        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_VDaf
        if jcxmsx_and_avg_jyjg_mapping_dict.get("VDaf") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_VDaf'] = jcxmsx_and_avg_jyjg_mapping_dict.get("VDaf")
        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_Std
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Std") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_Std'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Std")

        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_CRI
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CRI") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_CRI'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CRI")

        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_CSR
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CSR") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_CSR'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CSR")
        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_H2O
        if jcxmsx_and_avg_jyjg_mapping_dict.get("H2O") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_H2O'] = jcxmsx_and_avg_jyjg_mapping_dict.get("H2O")
        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_M10
        if jcxmsx_and_avg_jyjg_mapping_dict.get("M10") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_M10'] = jcxmsx_and_avg_jyjg_mapping_dict.get("M10")
        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_M40
        if jcxmsx_and_avg_jyjg_mapping_dict.get("M40") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_M40'] = jcxmsx_and_avg_jyjg_mapping_dict.get("M40")
        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_Less25mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("小于25mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_Less25mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get("小于25mm")
        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_Greater40mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于40mm粒度") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_Greater40mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于40mm粒度")
        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_Greater60mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于60mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_Greater60mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于60mm")
        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_Greater80mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于80mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiao_Greater80mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于80mm")

        # 二级焦(德丰焦炭)
        data_list = __select_hanfan_yuanranliao_qiukuaikuang(start, HanFanStatus.COKE_2_JI,
                                                             '113', '574', "39381")
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in data_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_Ad
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Ad") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_Ad'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Ad")

        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_FCad
        if jcxmsx_and_avg_jyjg_mapping_dict.get("FCad") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_FCad'] = jcxmsx_and_avg_jyjg_mapping_dict.get("FCad")

        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_VDaf
        if jcxmsx_and_avg_jyjg_mapping_dict.get("VDaf") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_VDaf'] = jcxmsx_and_avg_jyjg_mapping_dict.get("VDaf")
        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_Std
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Std") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_Std'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Std")

        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_CRI
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CRI") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_CRI'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CRI")

        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_CSR
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CSR") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_CSR'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CSR")
        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_H2O
        if jcxmsx_and_avg_jyjg_mapping_dict.get("H2O") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_H2O'] = jcxmsx_and_avg_jyjg_mapping_dict.get("H2O")
        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_M10
        if jcxmsx_and_avg_jyjg_mapping_dict.get("M10") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_M10'] = jcxmsx_and_avg_jyjg_mapping_dict.get("M10")
        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_M40
        if jcxmsx_and_avg_jyjg_mapping_dict.get("M40") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_M40'] = jcxmsx_and_avg_jyjg_mapping_dict.get("M40")
        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_Less25mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("小于25mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_Less25mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "小于25mm")
        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_Greater40mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于40mm粒度") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_Greater40mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于40mm粒度")
        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_Greater60mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于60mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_Greater60mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于60mm")
        # CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_Greater80mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于80mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng_Greater80mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于80mm")

        # 梗阳高硫焦
        data_list = __select_hanfan_yuanranliao_qiukuaikuang(start, HanFanStatus.COKE_GENGYANG_GAO_LIU_GANXI,
                                                             '114', '574', "47068")
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in data_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_Ad
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Ad") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_Ad'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Ad")

        # CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_FCad
        if jcxmsx_and_avg_jyjg_mapping_dict.get("FCad") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_FCad'] = jcxmsx_and_avg_jyjg_mapping_dict.get("FCad")

        # CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_VDaf
        if jcxmsx_and_avg_jyjg_mapping_dict.get("VDaf") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_VDaf'] = jcxmsx_and_avg_jyjg_mapping_dict.get("VDaf")
        # CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_Std
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Std") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_Std'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Std")

        # CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_CRI
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CRI") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_CRI'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CRI")

        # CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_CSR
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CSR") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_CSR'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CSR")
        # CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_H2O
        if jcxmsx_and_avg_jyjg_mapping_dict.get("H2O") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_H2O'] = jcxmsx_and_avg_jyjg_mapping_dict.get("H2O")
        # CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_M10
        if jcxmsx_and_avg_jyjg_mapping_dict.get("M10") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_M10'] = jcxmsx_and_avg_jyjg_mapping_dict.get("M10")
        # CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_M40
        if jcxmsx_and_avg_jyjg_mapping_dict.get("M40") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_M40'] = jcxmsx_and_avg_jyjg_mapping_dict.get("M40")
        # CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_Less25mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("小于25mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_Less25mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "小于25mm")
        # CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_Greater40mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于40mm粒度") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_Greater40mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于40mm粒度")

        # CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_Greater60mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于60mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_Greater60mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于60mm")
        # CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_Greater80mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于80mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu_Greater80mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于80mm")

        # 中滦二期(湿)
        data_list = __select_hanfan_yuanranliao_qiukuaikuang_without_provider_code(start,
                                                                                   HanFanStatus.COKE_ZHONG_LUAN_2_QI_SHI,
                                                                                   '717', '1320')
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in data_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_Ad
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Ad") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_Ad'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Ad")

        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_FCad
        if jcxmsx_and_avg_jyjg_mapping_dict.get("FCad") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_FCad'] = jcxmsx_and_avg_jyjg_mapping_dict.get("FCad")

        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_VDaf
        if jcxmsx_and_avg_jyjg_mapping_dict.get("VDaf") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_VDaf'] = jcxmsx_and_avg_jyjg_mapping_dict.get("VDaf")
        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_Std
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Std") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_Std'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Std")

        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_CRI
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CRI") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_CRI'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CRI")

        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_CSR
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CSR") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_CSR'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CSR")
        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_H2O
        if jcxmsx_and_avg_jyjg_mapping_dict.get("H2O") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_H2O'] = jcxmsx_and_avg_jyjg_mapping_dict.get("H2O")
        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_M10
        if jcxmsx_and_avg_jyjg_mapping_dict.get("M10") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_M10'] = jcxmsx_and_avg_jyjg_mapping_dict.get("M10")
        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_M40
        if jcxmsx_and_avg_jyjg_mapping_dict.get("M40") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_M40'] = jcxmsx_and_avg_jyjg_mapping_dict.get("M40")
        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_Less25mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("小于25mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_Less25mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "小于25mm")
        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_Greater40mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于40mm粒度") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_Greater40mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于40mm粒度")

        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_Greater60mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于60mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_Greater60mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于60mm")
        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_Greater80mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于80mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi_Greater80mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于80mm")
        # 文峰焦
        data_list = __select_hanfan_yuanranliao_qiukuaikuang(start, HanFanStatus.COKE_1_JI_DATUHE, '110', '574',
                                                             "53269")
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in data_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_Ad
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Ad") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_Ad'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Ad")

        # CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_FCad
        if jcxmsx_and_avg_jyjg_mapping_dict.get("FCad") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_FCad'] = jcxmsx_and_avg_jyjg_mapping_dict.get("FCad")

        # CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_VDaf
        if jcxmsx_and_avg_jyjg_mapping_dict.get("VDaf") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_VDaf'] = jcxmsx_and_avg_jyjg_mapping_dict.get("VDaf")
        # CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_Std
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Std") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_Std'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Std")

        # CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_CRI
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CRI") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_CRI'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CRI")

        # CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_CSR
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CSR") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_CSR'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CSR")
        # CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_H2O
        if jcxmsx_and_avg_jyjg_mapping_dict.get("H2O") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_H2O'] = jcxmsx_and_avg_jyjg_mapping_dict.get("H2O")
        # CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_M10
        if jcxmsx_and_avg_jyjg_mapping_dict.get("M10") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_M10'] = jcxmsx_and_avg_jyjg_mapping_dict.get("M10")
        # CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_M40
        if jcxmsx_and_avg_jyjg_mapping_dict.get("M40") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_M40'] = jcxmsx_and_avg_jyjg_mapping_dict.get("M40")
        # CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_Less25mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("小于25mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_Less25mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get("小于25mm")
        # CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_Greater40mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于40mm粒度") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_Greater40mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于40mm粒度")

        # CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_Greater60mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于60mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_Greater60mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于60mm")

        # CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_Greater80mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于80mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeWenfeng_Greater80mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于80mm")

        # 一级干熄焦炭
        data_list = __select_hanfan_yuanranliao_qiukuaikuang_without_provider_code(start, HanFanStatus.COKE_1_JI_GANXI,
                                                                                   '724', '574')
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in data_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_Ad
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Ad") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_Ad'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Ad")

        # CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_FCad
        if jcxmsx_and_avg_jyjg_mapping_dict.get("FCad") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_FCad'] = jcxmsx_and_avg_jyjg_mapping_dict.get("FCad")

        # CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_VDaf
        if jcxmsx_and_avg_jyjg_mapping_dict.get("VDaf") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_VDaf'] = jcxmsx_and_avg_jyjg_mapping_dict.get("VDaf")
        # CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_Std
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Std") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_Std'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Std")

        # CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_CRI
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CRI") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_CRI'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CRI")

        # CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_CSR
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CSR") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_CSR'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CSR")
        # CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_H2O
        if jcxmsx_and_avg_jyjg_mapping_dict.get("H2O") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_H2O'] = jcxmsx_and_avg_jyjg_mapping_dict.get("H2O")
        # CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_M10
        if jcxmsx_and_avg_jyjg_mapping_dict.get("M10") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_M10'] = jcxmsx_and_avg_jyjg_mapping_dict.get("M10")
        # CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_M40
        if jcxmsx_and_avg_jyjg_mapping_dict.get("M40") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_M40'] = jcxmsx_and_avg_jyjg_mapping_dict.get("M40")
        # CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_Less25mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("小于25mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_Less25mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get("小于25mm")
        # CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_Greater40mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于40mm粒度") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_Greater40mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于40mm粒度")

        # CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_Greater60mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于60mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_Greater60mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于60mm")

        # CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_Greater80mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于80mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi_Greater80mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于80mm")

        # 普通一级焦(东区)
        data_list = __select_hanfan_yuanranliao_qiukuaikuang_without_provider_code(start, HanFanStatus.COKE_1_JI_DATUHE,
                                                                                   '110', '574')
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in data_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_Ad
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Ad") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_Ad'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Ad")

        # CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_FCad
        if jcxmsx_and_avg_jyjg_mapping_dict.get("FCad") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_FCad'] = jcxmsx_and_avg_jyjg_mapping_dict.get("FCad")

        # CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_VDaf
        if jcxmsx_and_avg_jyjg_mapping_dict.get("VDaf") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_VDaf'] = jcxmsx_and_avg_jyjg_mapping_dict.get("VDaf")
        # CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_Std
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Std") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_Std'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Std")

        # CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_CRI
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CRI") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_CRI'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CRI")

        # CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_CSR
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CSR") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_CSR'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CSR")
        # CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_H2O
        if jcxmsx_and_avg_jyjg_mapping_dict.get("H2O") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_H2O'] = jcxmsx_and_avg_jyjg_mapping_dict.get("H2O")
        # CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_M10
        if jcxmsx_and_avg_jyjg_mapping_dict.get("M10") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_M10'] = jcxmsx_and_avg_jyjg_mapping_dict.get("M10")
        # CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_M40
        if jcxmsx_and_avg_jyjg_mapping_dict.get("M40") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_M40'] = jcxmsx_and_avg_jyjg_mapping_dict.get("M40")
        # CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_Less25mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("小于25mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_Less25mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "小于25mm")
        # CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_Greater40mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于40mm粒度") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_Greater40mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于40mm粒度")

        # CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_Greater60mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于60mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_Greater60mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于60mm")

        # CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_Greater80mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于80mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong_Greater80mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于80mm")

        # 中滦二期(干)
        data_list = __select_hanfan_yuanranliao_qiuTuan(start,
                                                        HanFanStatus.COKE_ZHONG_LUAN_2_QI_GAN_GANXI,
                                                        '716')
        jcxmsx_and_avg_jyjg_mapping_dict = {}
        for item in data_list:
            jcxmsx_and_avg_jyjg_mapping_dict[item.jcxmsx] = item.V

        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_Ad
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Ad") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_Ad'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Ad")

        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_FCad
        if jcxmsx_and_avg_jyjg_mapping_dict.get("FCad") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_FCad'] = jcxmsx_and_avg_jyjg_mapping_dict.get("FCad")

        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_VDaf
        if jcxmsx_and_avg_jyjg_mapping_dict.get("VDaf") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_VDaf'] = jcxmsx_and_avg_jyjg_mapping_dict.get("VDaf")
        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_Std
        if jcxmsx_and_avg_jyjg_mapping_dict.get("Std") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_Std'] = jcxmsx_and_avg_jyjg_mapping_dict.get("Std")

        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_CRI
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CRI") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_CRI'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CRI")

        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_CSR
        if jcxmsx_and_avg_jyjg_mapping_dict.get("CSR") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_CSR'] = jcxmsx_and_avg_jyjg_mapping_dict.get("CSR")
        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_H2O
        if jcxmsx_and_avg_jyjg_mapping_dict.get("H2O") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_H2O'] = jcxmsx_and_avg_jyjg_mapping_dict.get("H2O")
        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_M10
        if jcxmsx_and_avg_jyjg_mapping_dict.get("M10") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_M10'] = jcxmsx_and_avg_jyjg_mapping_dict.get("M10")
        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_M40
        if jcxmsx_and_avg_jyjg_mapping_dict.get("M40") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_M40'] = jcxmsx_and_avg_jyjg_mapping_dict.get("M40")
        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_Less25mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("小于25mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_Less25mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "小于25mm")
        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_Greater40mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于40mm粒度") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_Greater40mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于40mm粒度")

        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_Greater60mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于60mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_Greater60mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于60mm")

        # CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_Greater80mm
        if jcxmsx_and_avg_jyjg_mapping_dict.get("大于80mm") is not None:
            mapping['CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan_Greater80mm'] = jcxmsx_and_avg_jyjg_mapping_dict.get(
                "大于80mm")

        # dump to redis
        logging.info("start dump hanfan data,key size is " + str(len(mapping)))
        if len(mapping) > 0:
            ironman_redis.hmset(cache_key, mapping)

    except Exception as e:
        logging.error("dump hanfan error", exc_info=1)


def cal_hanfan_yuanranliao_ratio(hanFanModelInputPO: HanFanModelInputPO):
    """
    计算原燃料占比字段
    :param hanFanModelInputPO:
    :return:
    """

    shao1jifan = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao1jifan if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao1jifan is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    shao2jifan = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao2jifan if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao2jifan is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    shao3jifan = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao3jifan if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao3jifan is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    shao56jifan = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao56jifan if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao56jifan is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    shao1jipu = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao1jipu if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao1jipu is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    shao2jipu = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao2jipu if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao2jipu is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    shao3jipu = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao3jipu if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Shao3jipu is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE

    # CG_LT_GL_GL04_Yuanranliao_ZSshao(S_烧结矿总)
    zs_shao = shao1jifan + shao2jifan + shao3jifan + shao56jifan + shao1jipu + shao2jipu + shao3jipu
    if zs_shao > 0:
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZSshao = float(zs_shao)
        zBshao1jifan = float(shao1jifan / zs_shao)
        zBshao2jifan = float(shao2jifan / zs_shao)
        zBshao3jifan = float(shao3jifan / zs_shao)
        zBshao56jifan = float(shao56jifan / zs_shao)
        zBshao1jipu = float(shao1jipu / zs_shao)
        zBshao2jipu = float(shao2jipu / zs_shao)
        zBshao3jipu = float(shao3jipu / zs_shao)
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBshao1jifan = zBshao1jifan
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBshao2jifan = zBshao2jifan
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBshao3jifan = zBshao3jifan
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBshao56jifan = zBshao56jifan
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBshao1jipu = zBshao1jipu
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBshao2jipu = zBshao2jipu
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBshao3jipu = zBshao3jipu
    else:
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZSshao = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBshao1jifan = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBshao2jifan = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBshao3jifan = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBshao56jifan = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBshao1jipu = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBshao2jipu = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBshao3jipu = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE

    qiuXintongMei = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_QiuXintongMei if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_QiuXintongMei is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    qiucChuangyuanMei = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_QiucChuangyuanMei is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    qiuShuangfuFan = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuFan is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    qiuShuangfuMei = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMei is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    qiuShuangfuMeik1 = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1 if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_QiuShuangfuMeik1 is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    qiuAozhouhanfan = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_QiuAozhouhanfan if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_QiuAozhouhanfan is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    qiuEluosi = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_QiuEluosi if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_QiuEluosi is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE

    # CG_LT_GL_GL04_Yuanranliao_ZQiu
    zQiu = qiuXintongMei + qiucChuangyuanMei + qiuShuangfuFan + qiuShuangfuMei + \
           qiuShuangfuMeik1 + qiuAozhouhanfan + qiuEluosi
    if zQiu > 0:
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZQiu = float(zQiu)
        zBqiuXintongMei = qiuXintongMei / zQiu
        zBqiuChuangyuanMei = qiucChuangyuanMei / zQiu
        zBqiuShuangfuFan = qiuShuangfuFan / zQiu
        zqiuShuangfuMei = qiuShuangfuMei / zQiu
        zBqiuShuangfuMeik1 = qiuShuangfuMeik1 / zQiu
        zBqiuAozhouhanfan = qiuAozhouhanfan / zQiu
        zBqiuEluosi = qiuEluosi / zQiu
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuXintongMei = zBqiuXintongMei
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuChuangyuanMei = zBqiuChuangyuanMei
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuShuangfuFan = zBqiuShuangfuFan
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuShuangfuMei = zqiuShuangfuMei
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuShuangfuMeik1 = zBqiuShuangfuMeik1
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan = zBqiuAozhouhanfan
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuEluosi = zBqiuEluosi
    else:
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZQiu = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuXintongMei = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuChuangyuanMei = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuShuangfuFan = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuShuangfuMei = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuShuangfuMeik1 = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuAozhouhanfan = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiuEluosi = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE

    kuaiWeiruineila = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_KuaiWeiruineila if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_QiuEluosi is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    kuaiAokuai = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_KuaiAokuai if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_QiuEluosi is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    kuaiAokuaiPB = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_KuaiAokuaiPB if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_QiuEluosi is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    kuaiNiuman = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_KuaiNiuman if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_QiuEluosi is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE

    # CG_LT_GL_GL04_Yuanranliao_ZKuai
    zKuai = kuaiWeiruineila + kuaiAokuai + kuaiAokuaiPB + kuaiNiuman
    if zKuai > 0:
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZKuai = float(zKuai)
        zBkuaiWeiruineila = float(kuaiWeiruineila / zKuai)
        zBkuaiAokuai = float(kuaiAokuai / zKuai)
        zBkuaiAokuaiPB = float(kuaiAokuaiPB / zKuai)
        zBkuaiNiuman = float(kuaiNiuman / zKuai)
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBkuaiWeiruineila = zBkuaiWeiruineila
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBkuaiAokuai = zBkuaiAokuai
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBkuaiAokuaiPB = zBkuaiAokuaiPB
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBkuaiNiuman = zBkuaiNiuman
    else:
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZKuai = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBkuaiWeiruineila = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBkuaiAokuai = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBkuaiAokuaiPB = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBkuaiNiuman = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE

    # CG_LT_GL_GL04_Yuanranliao_ZKuanghao
    zKuanghao = float(zs_shao + zQiu + zKuai)
    if zKuanghao > 0:
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZKuanghao = float(zKuanghao)
        zBshao = float(zs_shao / zKuanghao)
        zBqiu = float(zQiu / zKuanghao)
        zBkuai = float(zKuai / zKuanghao)
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBshao = float(zBshao)
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiu = float(zBqiu)
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBkuai = float(zBkuai)
    else:
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZKuanghao = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBshao = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBqiu = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBkuai = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE

    from app.exts import mongo

    obj = dict(datetime=datetime.datetime.strftime(datetime.datetime.now(), "%Y-%m-%d %H:%M:%S"),
               zKuanghao=zKuanghao, zs_shao=zs_shao, zQiu=zQiu, zKuai=zKuai,
               kuaiWeiruineila=kuaiWeiruineila, kuaiAokuai=kuaiAokuai, kuaiAokuaiPB=kuaiAokuaiPB,
               kuaiNiuman=kuaiNiuman,
               qiuXintongMei=qiuXintongMei, qiucChuangyuanMei=qiucChuangyuanMei, qiuShuangfuFan=qiuShuangfuFan,
               qiuShuangfuMei=qiuShuangfuMei, qiuShuangfuMeik1=qiuShuangfuMeik1, qiuAozhouhanfan=qiuAozhouhanfan,
               qiuEluosi=qiuEluosi,
               shao1jifan=shao1jifan, shao2jifan=shao2jifan, shao3jifan=shao3jifan, shao56jifan=shao56jifan,
               shao1jipu=shao1jipu, shao2jipu=shao2jipu, shao3jipu=shao3jipu
               )
    # mongo.db.hanfan.insert(obj)

    cokeWenfeng = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_CokeWenfeng if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_CokeWenfeng is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    coke1jiganxi = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Coke1jiganxi is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    cokeZhongluan2qiGan = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiGan is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    cokeZhongluan2qiShi = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_CokeZhongluan2qiShi is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    coke2jiganxi = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Coke2jiganxi is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    coke2jijiao = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Coke2jijiao if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Coke2jijiao is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    coke2jijiaoDefeng = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Coke2jijiaoDefeng is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    coke1jiDatuhe = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_Coke1jiDatuhe is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    cokeDefeng = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_CokeDefeng if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_CokeDefeng is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    cokeGengyanggaoliu = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_CokeGengyanggaoliu is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    cokePutong1jiDong = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_CokePutong1jiDong is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    cokeJiaoding = hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_CokeJiaoding if hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_CokeJiaoding is not None else HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE

    # CG_LT_GL_GL04_Yuanranliao_ZCoke
    zCoke = cokeWenfeng + coke1jiganxi + cokeZhongluan2qiGan + cokeZhongluan2qiShi + coke2jiganxi + \
            coke2jijiao + coke2jijiaoDefeng + coke1jiDatuhe + cokeDefeng + cokeGengyanggaoliu + \
            cokePutong1jiDong + cokeJiaoding

    if zCoke > 0:
        zBcokeWenfeng = cokeWenfeng / zCoke
        zBcoke1jiganxi = coke1jiganxi / zCoke
        zBcokeZhongluan2qiGan = cokeZhongluan2qiGan / zCoke
        zBcokeZhongluan2qiShi = cokeZhongluan2qiShi / zCoke
        zBcoke2jiganxi = coke2jiganxi / zCoke
        zBcoke2jijiao = coke2jijiao / zCoke
        zBcoke2jijiaoDefeng = coke2jijiaoDefeng / zCoke
        zBcoke1jiDatuhe = coke1jiDatuhe / zCoke
        zBcokeDefeng = cokeDefeng / zCoke
        zBcokePutong1jiDong = cokePutong1jiDong / zCoke
        zBcokeGengyanggaoliu = cokeGengyanggaoliu / zCoke
        zBcokeJiaoding = cokeJiaoding / zCoke
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcokeWenfeng = zBcokeWenfeng
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcoke1jiganxi = zBcoke1jiganxi
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcokeZhongluan2qiGan = zBcokeZhongluan2qiGan
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcokeZhongluan2qiShi = zBcokeZhongluan2qiShi
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcoke2jiganxi = zBcoke2jiganxi
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcoke2jijiao = zBcoke2jijiao
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcoke2jijiaoDefeng = zBcoke2jijiaoDefeng
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcoke1jiDatuhe = zBcoke1jiDatuhe
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcokeDefeng = zBcokeDefeng
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcokePutong1jiDong = zBcokePutong1jiDong
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcokeGengyanggaoliu = zBcokeGengyanggaoliu
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcokeJiaoding = zBcokeJiaoding
    else:
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcokeWenfeng = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcoke1jiganxi = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcokeZhongluan2qiGan = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcokeZhongluan2qiShi = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcoke2jiganxi = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcoke2jijiao = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcoke2jijiaoDefeng = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcoke1jiDatuhe = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcokeDefeng = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcokePutong1jiDong = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcokeGengyanggaoliu = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
        hanFanModelInputPO.CG_LT_GL_GL04_Yuanranliao_ZBcokeJiaoding = HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE
    return hanFanModelInputPO


def __calculate_v(start, end_before_hour: int):
    """
    计算高炉V的值
    :param start: 开始时间
    :param end_before_hour: 前多少小时, type: int
    :return:
    """
    t1_sub_query = convert.query(gaolu_model.ZlJyh, jcxmbm='01048', zfbz='0') \
        .join(gaolu_model.ZlJyt, gaolu_model.ZlJyh.jytid == gaolu_model.ZlJyt.jytid) \
        .filter(gaolu_model.ZlJyt.wlbm == '60110101', func.substring(gaolu_model.ZlJyt.ph, 3, 1) == '4') \
        .group_by(func.substring(gaolu_model.ZlJyt.ph, 1, 7)) \
        .with_entities(func.avg(func.cast(gaolu_model.ZlJyh.jyjg, DECIMAL(10, 5))).label('V'),
                       func.max(func.substring(gaolu_model.ZlJyt.ph, 4, 4)).label('FNumber')) \
        .subquery()
    now_before_48_hour = start - datetime.timedelta(hours=48)

    end = start - datetime.timedelta(hours=end_before_hour)
    v_before_hour = convert.query(gaolu_model.GaoLuChuTie, finsid=8) \
        .join(t1_sub_query, gaolu_model.GaoLuChuTie.fnumber == t1_sub_query.c.FNumber) \
        .filter(gaolu_model.GaoLuChuTie.fdatetime.between(now_before_48_hour, end)) \
        .order_by(gaolu_model.GaoLuChuTie.fdatetime.desc()) \
        .limit(1) \
        .with_entities(t1_sub_query.c.V).first()
    return v_before_hour


def __select_hanfan_yuanranliao(label, fitemid, fbomtype=4):
    """
    根据输入的参数查询原燃料数据字段
    :return:
    """
    if fbomtype is not None:
        t1_sub_query = convert.query(gaolu_model.ZlJyh, fitemid=fitemid, fbomtype=fbomtype).subquery()
    else:
        t1_sub_query = convert.query(gaolu_model.ZlJyh, fitemid=fitemid).subquery()
    yuanranliao_column = convert.query(t1_sub_query) \
        .with_entities(t1_sub_query.c.FDate, t1_sub_query.c.FQty.label(label),
                       int(t1_sub_query.c.Fnote.label('FHour'))).first()
    return yuanranliao_column


def __select_hanfan_jishao(start_date, wlbm, jifan_number, hour_in_ph):
    """
    根据传入的条件查询含钒的含钒的原燃料数据
    :param start_date: 查询时间
    :param wlbm: 物料编码
    :param jifan_number: 原燃料的机器编号
    :param hour_in_ph: 当前小时
    :return:
    """
    query = convert.query(gaolu_model.ZlJyt, wlbm=wlbm) \
        .join(gaolu_model.ZlJyh, gaolu_model.ZlJyt.jytid == gaolu_model.ZlJyh.jytid) \
        .filter(gaolu_model.ZlJyh.zfbz == 0,
                # func.cast(func.substring(gaolu_model.ZlJyt.ph, 4, 2), INT) == int(str(start_date.year)[2:]),
                # func.cast(func.substring(gaolu_model.ZlJyt.ph, 6, 2), INT) == start_date.month,
                # func.cast(func.substring(gaolu_model.ZlJyt.ph, 8, 2), INT) == start_date.day,
                func.substring(gaolu_model.ZlJyt.ph, 10, 1) == jifan_number,
                func.cast(func.substring(gaolu_model.ZlJyt.ph, 11, 1), INT) == hour_in_ph
                ) \
        .group_by(gaolu_model.ZlJyh.jcxmsx, gaolu_model.ZlJyt.ph) \
        .with_entities(func.any_value(gaolu_model.ZlJyh.jcxmsx).label('jcxmsx'),
                       func.avg(func.cast(gaolu_model.ZlJyh.jyjg, FLOAT)).label('V'))

    logging.info(literalquery(query.statement))
    return query.all()


def __select_hanfan_yuanranliao_qiukuaikuang(start_date, wlbm, batch_ph, fetch_place_code, provider_code):
    """
    根据传入的条件查询含钒库中的块矿、球团矿等原燃料数据
    :return:
    """
    query = convert.query(gaolu_model.Batch, fetch_place_code=fetch_place_code, provider_code=provider_code) \
        .join(gaolu_model.WJJYT, gaolu_model.Batch.batch_ph == gaolu_model.WJJYT.batch_ph) \
        .join(gaolu_model.WJJYH, gaolu_model.WJJYH.jytid == gaolu_model.WJJYT.jytid) \
        .filter(gaolu_model.WJJYH.zfbz == '0',
                gaolu_model.WJJYH.ztbz == '2',
                gaolu_model.WJJYT.wlbm == wlbm,
                func.cast(func.substring(gaolu_model.WJJYT.batch_ph, 4, 2), INT) == int(str(start_date.year)[2:]),
                func.cast(func.substring(gaolu_model.WJJYT.batch_ph, 6, 2), INT) == start_date.month,
                func.cast(func.substring(gaolu_model.WJJYT.batch_ph, 8, 2), INT) == start_date.day,
                func.substring(gaolu_model.WJJYT.batch_ph, 1, 3) == batch_ph,
                ) \
        .group_by(gaolu_model.WJJYH.jcxmsx) \
        .with_entities(func.any_value(gaolu_model.WJJYH.jcxmsx).label('jcxmsx'),
                       func.avg(func.cast(gaolu_model.WJJYH.jyjg, FLOAT)).label('V'))

    logging.info(literalquery(query.statement))
    return query.all()


def __select_hanfan_yuanranliao_qiukuaikuang_without_provider_code(start_date, wlbm, batch_ph, fetch_place_code):
    """
    根据传入的条件查询含钒库中的块矿、球团矿等原燃料数据
    :return:
    """
    query = convert.query(gaolu_model.Batch, fetch_place_code=fetch_place_code) \
        .join(gaolu_model.WJJYT, gaolu_model.Batch.batch_ph == gaolu_model.WJJYT.batch_ph) \
        .join(gaolu_model.WJJYH, gaolu_model.WJJYH.jytid == gaolu_model.WJJYT.jytid) \
        .filter(gaolu_model.WJJYH.zfbz == '0',
                gaolu_model.WJJYH.ztbz == '2',
                gaolu_model.WJJYT.wlbm == wlbm,
                func.cast(func.substring(gaolu_model.WJJYT.batch_ph, 4, 2), INT) == int(str(start_date.year)[2:]),
                func.cast(func.substring(gaolu_model.WJJYT.batch_ph, 6, 2), INT) == start_date.month,
                func.cast(func.substring(gaolu_model.WJJYT.batch_ph, 8, 2), INT) == start_date.day,
                func.substring(gaolu_model.WJJYT.batch_ph, 1, 3) == batch_ph,
                ) \
        .group_by(gaolu_model.WJJYH.jcxmsx) \
        .with_entities(func.any_value(gaolu_model.WJJYH.jcxmsx).label('jcxmsx'),
                       func.avg(func.cast(gaolu_model.WJJYH.jyjg, FLOAT)).label('V'))

    logging.info(literalquery(query.statement))
    return query.all()


def __get_hour_in_ph(hour: int):
    """
    根据当前时间推导出syn_zl_zl_jyt表的ph字段中第11位的值
    :param hour:
    :return:
    """
    if 1 <= hour < 9:
        return 1
    elif 9 <= hour < 17:
        return 2
    else:
        return 3


def __calculate_TieShui_or_LuZha(start, end_before_hour: int, jcxmbm: str):
    """
    根据传入的jcxmbm参数查询铁水或者炉渣原燃料字段的值
    :param start: 开始时间
    :param end_before_hour: 前多少小时, type: int
    :param jcxmbm: 检测项目编码
    :return:
    """
    logging.info("current jcxmbm is " + jcxmbm)
    t1_sub_query = convert.query(gaolu_model.ZlJyh, jcxmbm=jcxmbm, zfbz='0') \
        .join(gaolu_model.ZlJyt, gaolu_model.ZlJyh.jytid == gaolu_model.ZlJyt.jytid) \
        .join(gaolu_model.TQPD, gaolu_model.ZlJyt.ph == gaolu_model.TQPD.ph) \
        .filter(gaolu_model.ZlJyt.wlbm == '60110101', func.substring(gaolu_model.ZlJyt.ph, 3, 1) == '4',
                gaolu_model.TQPD.ztbz == '1') \
        .group_by(func.substring(gaolu_model.ZlJyt.ph, 1, 7)) \
        .with_entities(func.avg(func.cast(gaolu_model.ZlJyh.jyjg, DECIMAL(10, 5))).label('YuanRanLiao'),
                       func.max(func.substring(gaolu_model.ZlJyt.ph, 4, 4)).label('FNumber')) \
        .subquery()
    now_before_48_hour = start - datetime.timedelta(hours=48)

    end = start - datetime.timedelta(hours=end_before_hour)
    v_before_hour = convert.query(gaolu_model.GaoLuChuTie, finsid=8) \
        .join(t1_sub_query, gaolu_model.GaoLuChuTie.fnumber == t1_sub_query.c.FNumber) \
        .filter(gaolu_model.GaoLuChuTie.fdatetime.between(now_before_48_hour, end)) \
        .order_by(gaolu_model.GaoLuChuTie.fdatetime.desc()) \
        .limit(9) \
        .with_entities(t1_sub_query.c.YuanRanLiao)

    logging.info(literalquery(v_before_hour.statement))
    return v_before_hour.all()


def __calculate_LuZha_Yuanranliao_by_wlbm_and_jcxmbm(start, end_before_hour: int, jcxmbm: str, wlbm: str):
    """
    根据传入的jcxmbm和wlbm参数查询炉渣原燃料字段的值
    :param start: 开始时间
    :param end_before_hour: 前多少小时, type: int
    :param jcxmbm: 检测项目编码
    :return:
    """
    t1_sub_query = convert.query(gaolu_model.ZlJyh, jcxmbm=jcxmbm, zfbz='0') \
        .join(gaolu_model.ZlJyt, gaolu_model.ZlJyh.jytid == gaolu_model.ZlJyt.jytid) \
        .join(gaolu_model.TQPD, gaolu_model.ZlJyt.ph == gaolu_model.TQPD.ph) \
        .filter(gaolu_model.ZlJyt.wlbm == wlbm, func.substring(gaolu_model.ZlJyt.ph, 4, 1) == '4',
                gaolu_model.TQPD.ztbz == '1') \
        .group_by(func.substring(gaolu_model.ZlJyt.ph, 2, 7)) \
        .with_entities(func.avg(func.cast(gaolu_model.ZlJyh.jyjg, DECIMAL(10, 5))).label('YuanRanLiao'),
                       func.max(func.substring(gaolu_model.ZlJyt.ph, 5, 4)).label('FNumber')) \
        .subquery()
    now_before_48_hour = start - datetime.timedelta(hours=48)

    end = start - datetime.timedelta(hours=end_before_hour)
    v_before_hour = convert.query(gaolu_model.GaoLuChuTie, finsid=8) \
        .join(t1_sub_query, gaolu_model.GaoLuChuTie.fnumber == t1_sub_query.c.FNumber) \
        .filter(gaolu_model.GaoLuChuTie.fdatetime.between(now_before_48_hour, end)) \
        .order_by(gaolu_model.GaoLuChuTie.fdatetime.desc()) \
        .limit(9) \
        .with_entities(t1_sub_query.c.YuanRanLiao)

    logging.info(literalquery(v_before_hour.statement))
    return v_before_hour.all()


def __select_hanfan_yuanranliao_qiuTuan(start_date, wlbm, batch_ph):
    """
    根据传入的条件查询球团等原燃料数据
    :return:
    """
    query = convert.query(gaolu_model.WJJYH, zfbz='0', ztbz='2') \
        .join(gaolu_model.WJJYT, gaolu_model.WJJYH.jytid == gaolu_model.WJJYT.jytid) \
        .join(gaolu_model.Batch, gaolu_model.Batch.batch_ph == gaolu_model.WJJYT.batch_ph) \
        .filter(gaolu_model.WJJYT.wlbm == wlbm,
                func.cast(func.substring(gaolu_model.WJJYT.batch_ph, 4, 2), INT) == int(str(start_date.year)[2:]),
                func.cast(func.substring(gaolu_model.WJJYT.batch_ph, 6, 2), INT) == start_date.month,
                func.cast(func.substring(gaolu_model.WJJYT.batch_ph, 8, 2), INT) == start_date.day,
                func.substring(gaolu_model.Batch.batch_ph, 1, 3) == batch_ph
                ) \
        .group_by(gaolu_model.WJJYH.jcxmsx) \
        .with_entities(func.any_value(gaolu_model.WJJYH.jcxmsx).label('jcxmsx'),
                       func.avg(func.cast(gaolu_model.WJJYH.jyjg, FLOAT)).label('V'))

    logging.info(
        literalquery(query.statement))
    return query.all()


def __set_default_value_if_null(hanfan_predict_po: HanFanPredictPO):
    for v in hanfan_predict_po.__dir__():
        if v.startswith('CG') and hanfan_predict_po.__getattribute__(v) is None:
            hanfan_predict_po.__setattr__(v, HanFanStatus.YUAN_RAN_LIAO_DEFAULT_VALUE)
    return hanfan_predict_po


def _set_mapping(mapping, key, value):
    mapping[key] = value
    logging.info("{} {}".format(key, value))
